Skip to content

Commit

Permalink
revert some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Sep 26, 2024
1 parent 9acc0d1 commit 447788f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class GroupTest {
)

assertEquals(
Conversation.Group(group).peerAddresses().sorted(),
Conversation.Group(group).peerAddresses.sorted(),
listOf(
caroClient.inboxId,
alixClient.inboxId,
Expand Down
13 changes: 7 additions & 6 deletions library/src/main/java/org/xmtp/android/library/Conversation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ sealed class Conversation {
}
}

fun peerAddresses(): List<String> {
return when (this) {
is V1 -> listOf(conversationV1.peerAddress)
is V2 -> listOf(conversationV2.peerAddress)
is Group -> runBlocking { group.peerInboxIds() }
val peerAddresses: List<String>
get() {
return when (this) {
is V1 -> listOf(conversationV1.peerAddress)
is V2 -> listOf(conversationV2.peerAddress)
is Group -> runBlocking { group.peerInboxIds() }
}
}
}

// This distinctly identifies between two addresses.
// Note: this will be empty for older v1 conversations.
Expand Down

0 comments on commit 447788f

Please sign in to comment.