fix: no member in room #8

Merged
reya merged 2 commits from fix-empty-room into master 2026-06-01 02:53:57 +00:00
Showing only changes of commit badc47bb61 - Show all commits

View File

@@ -43,8 +43,11 @@ data class Room(
val pubkeys: MutableSet<PublicKey> = mutableSetOf()
pubkeys.add(rumor.author())
pubkeys.addAll(rumor.tags().publicKeys())
// Also remove the user's public key from the list, current user is always a member
pubkeys.remove(userPubkey)
if (pubkeys.size > 1 && pubkeys.contains(userPubkey)) {
pubkeys.remove(userPubkey)
}
// Create a new Room instance
return Room(