Skip to content

Commit cfacdb7

Browse files
committed
add protos and new subscribe method
1 parent da435d7 commit cfacdb7

File tree

1 file changed

+11
-0
lines changed
  • library/src/main/java/org/xmtp/android/library/push

1 file changed

+11
-0
lines changed

library/src/main/java/org/xmtp/android/library/push/XMTPPush.kt

+11
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ class XMTPPush() {
5151
client.subscribe(request)
5252
}
5353

54+
fun subscribeWithMetadata(subscriptions: List<Service.Subscription>) {
55+
if (pushServer == "") {
56+
throw XMTPException("No push server")
57+
}
58+
val request = Service.SubscribeWithMetadataRequest.newBuilder().also { request ->
59+
request.installationId = installationId
60+
request.addAllSubscriptions(subscriptions)
61+
}.build()
62+
client.subscribeWithMetadata(request)
63+
}
64+
5465
fun unsubscribe(topics: List<String>) {
5566
if (pushServer == "") {
5667
throw XMTPException("No push server")

0 commit comments

Comments
 (0)