Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find Client by inboxId not address #412

Merged
merged 9 commits into from
Jun 11, 2024
505 changes: 254 additions & 251 deletions android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class GroupWrapper {
GroupPermissions.ADMIN_ONLY -> "admin_only"
}
return mapOf(
"clientAddress" to client.address,
"id" to group.id.toHex(),
"createdAt" to group.createdAt.time,
"peerInboxIds" to group.peerInboxIds(),
Expand Down
8 changes: 4 additions & 4 deletions example/src/tests/groupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ test('can make a MLS V3 client from bundle', async () => {
const group1 = await client.conversations.newGroup([anotherClient.address])

assert(
group1.clientAddress === client.address,
`clients dont match ${client.address} and ${group1.clientAddress}`
group1.client.address === client.address,
`clients dont match ${client.address} and ${group1.client.address}`
)

const bundle = await client.exportKeyBundle()
Expand Down Expand Up @@ -211,8 +211,8 @@ test('can make a MLS V3 client from bundle', async () => {
const group = await client2.conversations.newGroup([randomClient.address])

assert(
group.clientAddress === client2.address,
`clients dont match ${client2.address} and ${group.clientAddress}`
group.client.address === client2.address,
`clients dont match ${client2.address} and ${group.client.address}`
)

return true
Expand Down
4 changes: 2 additions & 2 deletions example/src/tests/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ test('can stream messages', async () => {
})
await delayToPropogate()

if (bobConvo.clientAddress !== bob.address) {
throw Error('Unexpected client address ' + bobConvo.clientAddress)
if (bobConvo.client.address !== bob.address) {
throw Error('Unexpected client address ' + bobConvo.client.address)
}
if (!bobConvo.topic) {
throw Error('Missing topic ' + bobConvo.topic)
Expand Down
496 changes: 248 additions & 248 deletions ios/XMTPModule.swift

Large diffs are not rendered by default.

Loading
Loading