Skip to content

Instantly share code, notes, and snippets.

@jetaggart
Created June 29, 2020 18:42
Show Gist options
  • Save jetaggart/a47a61af6c63d1ee5bf1b34358853d20 to your computer and use it in GitHub Desktop.
Save jetaggart/a47a61af6c63d1ee5bf1b34358853d20 to your computer and use it in GitHub Desktop.
// android/app/src/main/java/io/getstream/thestream/services/ChatService.kt:35
fun createPrivateChannel(otherUser: String): Channel {
val users = listOf(user.id, otherUser)
val result = client
.createChannel(ModelType.channel_messaging, users)
.execute()
if (result.isSuccess) {
return result.data()
} else {
throw result.error()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment