Skip to content

Commit

Permalink
fix up the is active test
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Feb 13, 2024
1 parent 18f4149 commit f2787d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,13 @@ class GroupTest {
caro.walletAddress
)
)
runBlocking { caroClient.conversations.syncGroups() }
val caroGroup = caroClient.conversations.listGroups().first()
assert(caroGroup.isActive())
assert(group.isActive())
group.removeMembers(listOf(bo.walletAddress))
assert(!group.isActive())
group.removeMembers(listOf(caro.walletAddress))
assert(group.isActive())
assert(!caroGroup.isActive())
}

@Test
Expand Down
1 change: 1 addition & 0 deletions library/src/main/java/org/xmtp/android/library/Group.kt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class Group(val client: Client, private val libXMTPGroup: FfiGroup) {
}

fun isActive(): Boolean {
runBlocking { libXMTPGroup.sync() }
return libXMTPGroup.isActive()
}

Expand Down

0 comments on commit f2787d8

Please sign in to comment.