Skip to content

Instantly share code, notes, and snippets.

@JcMinarro
Created May 13, 2020 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JcMinarro/f6db608141ed32cb24177fe24a7f1297 to your computer and use it in GitHub Desktop.
Save JcMinarro/f6db608141ed32cb24177fe24a7f1297 to your computer and use it in GitHub Desktop.
val newMessage = Message().apply { text = "It's the message we will send" }
channelController.sendMessage(newMessage).enqueue {
when (it.isSuccess) {
true -> {
// The message was sent, and we have all extra data on the message that return data() method
val sentMessage = it.data()
}
false -> {
// There was an error sending the message, you can check it on the error() method
it.error()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment