Skip to content

Instantly share code, notes, and snippets.

@nparsons08
Created Dec 11, 2019
Embed
What would you like to do?
// mobile/android/app/src/main/kotlin/io/getstream/flutter_the_stream/MainActivity.kt:59
private fun postMessage(user: String, token: String, message: String) {
val client = CloudClient.builder(API_KEY, token, user).build()
val feed = client.flatFeed("user")
feed.addActivity(
Activity
.builder()
.actor("SU:${user}")
.verb("post")
.`object`(UUID.randomUUID().toString())
.extraField("message", message)
.build()
).join()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment