Skip to content

Commit

Permalink
small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Oct 17, 2024
1 parent edfa2b6 commit a4b056a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -773,11 +773,12 @@ class GroupTest {
Thread.sleep(2500)
caroClient.conversations.newGroup(listOf(alix.walletAddress))
caroClient.conversations.findOrCreateDm(alix.walletAddress)
boClient.conversations.findOrCreateDm(alix.walletAddress)
}

Thread.sleep(2500)

assertEquals(2, allMessages.size)
assertEquals(3, allMessages.size)

job.cancel()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ data class Conversations(
if (client.v3Client != null) {
val dm = findOrCreateDm(peerAddress)
val conversation = Conversation.Dm(dm)
if (!client.hasV2Client) conversationsByTopic[conversation.topic] = conversation
if (!client.hasV2Client || !client.canMessage(peerAddress)) {
return conversation
}
Expand Down Expand Up @@ -436,7 +437,7 @@ data class Conversations(
syncConversations()
val dms = listDms().map { Conversation.Dm(it) }
if (!client.hasV2Client) {
conversationsByTopic += dms.map { it.topic to it }
conversationsByTopic = dms.associate { it.topic to it as Conversation }.toMutableMap()
} else {
try {
conversationsByTopic.putAll(
Expand Down

0 comments on commit a4b056a

Please sign in to comment.