awaitSendMessage

suspend fun ChatRoom.awaitSendMessage(request: SendMessageRequest): ChatMessage

Sends a message request to the room through a socket connection using suspending function.

Return

ChatMessage corresponding to the sent request

Parameters

request

message to be send and related metadata to be sent

Throws

when provided request fails to serialise

when chat room rejects the message