add send message
This commit is contained in:
+1
-3
@@ -32,9 +32,7 @@ fun Route.setupChat(
|
||||
val userId = call.obtainUserId()
|
||||
val info = call.receive<Message>()
|
||||
if (info.role != ChatRoles.USER) throw BadRequestException("invalid role")
|
||||
val repository = chatRepositoryFactory.create(userId)
|
||||
repository.send(info)
|
||||
val response = processUserMessageUseCase.execute(userId)
|
||||
val response = processUserMessageUseCase.execute(info, userId)
|
||||
remoteEventHandler.notify(RemoteEvent.OnChatUpdate(userId))
|
||||
call.respond(response)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user