Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val data: Map<String, Any> = mapOf("name" to "The name of the channel")
channelController.query(
QueryChannelRequest()
.withData(data)
.withMessages(100)
.withWatch()
).enqueue {
when (it.isSuccess) {
true -> {
// Channel has been created and we can get it calling to the data() method
val channel: Channel = it.data()
// Inside of the channel, we can find received messages
showMessages(it.data().messages)
}
false -> {
// Something went wrong, we have the error on the error() method
handleError(it.error())
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.