Fixes room names when clients send the same user twice in the ptags.

This commit is contained in:
Vitor Pamplona
2023-08-16 18:10:56 -04:00
parent fee2a0e4f8
commit ce27be2053
@@ -31,9 +31,9 @@ class ChatMessageEvent(
val listedPubKeys = recipientsPubKey() val listedPubKeys = recipientsPubKey()
val result = if (pubKey == oneSideHex) { val result = if (pubKey == oneSideHex) {
listedPubKeys.minus(oneSideHex).toSet() listedPubKeys.toSet().minus(oneSideHex)
} else { } else {
listedPubKeys.plus(pubKey).minus(oneSideHex).toSet() listedPubKeys.plus(pubKey).toSet().minus(oneSideHex)
} }
if (result.isEmpty()) { if (result.isEmpty()) {