From bd896e082f25cb587efa43204330d9bfb1cfd3bb Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Thu, 22 Feb 2024 07:09:22 -0800 Subject: [PATCH] pass in peer addresses instead of memeber addresses --- .../expo/modules/xmtpreactnativesdk/wrappers/GroupWrapper.kt | 3 ++- ios/Wrappers/GroupWrapper.swift | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/expo/modules/xmtpreactnativesdk/wrappers/GroupWrapper.kt b/android/src/main/java/expo/modules/xmtpreactnativesdk/wrappers/GroupWrapper.kt index da6d07f4e..0529773f0 100644 --- a/android/src/main/java/expo/modules/xmtpreactnativesdk/wrappers/GroupWrapper.kt +++ b/android/src/main/java/expo/modules/xmtpreactnativesdk/wrappers/GroupWrapper.kt @@ -4,6 +4,7 @@ import android.util.Base64 import android.util.Base64.NO_WRAP import com.google.gson.GsonBuilder import org.xmtp.android.library.Client +import org.xmtp.android.library.Conversation import org.xmtp.android.library.Group import org.xmtp.android.library.toHex import uniffi.xmtpv3.GroupPermissions @@ -20,7 +21,7 @@ class GroupWrapper { "clientAddress" to client.address, "id" to group.id.toHex(), "createdAt" to group.createdAt.time, - "peerAddresses" to group.memberAddresses(), + "peerAddresses" to Conversation.Group(group).peerAddresses, "version" to "GROUP", "topic" to group.id.toHex(), "permissionLevel" to permissionString, diff --git a/ios/Wrappers/GroupWrapper.swift b/ios/Wrappers/GroupWrapper.swift index 0be981934..24cbe0fd7 100644 --- a/ios/Wrappers/GroupWrapper.swift +++ b/ios/Wrappers/GroupWrapper.swift @@ -21,7 +21,7 @@ struct GroupWrapper { "clientAddress": client.address, "id": group.id.toHex, "createdAt": UInt64(group.createdAt.timeIntervalSince1970 * 1000), - "peerAddresses": group.memberAddresses, + "peerAddresses": XMTP.Conversation.group(group).peerAddresses, "version": "GROUP", "topic": group.id.toHex, "permissionLevel": permissionString,