From 60377c0c351f81ee1d87e72d5098b68da6d8c87d Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 29 Aug 2025 07:38:18 -0400 Subject: [PATCH] Fixes inability to delete relays from certain relay lists. --- .../nip37Drafts/privateOutbox/PrivateOutboxRelayListEvent.kt | 2 +- .../vitorpamplona/quartz/nip50Search/SearchRelayListEvent.kt | 2 +- .../quartz/nip51Lists/relayLists/BlockedRelayListEvent.kt | 2 +- .../quartz/nip51Lists/relayLists/BroadcastRelayListEvent.kt | 2 +- .../quartz/nip51Lists/relayLists/IndexerRelayListEvent.kt | 2 +- .../quartz/nip51Lists/relayLists/ProxyRelayListEvent.kt | 2 +- .../quartz/nip51Lists/relayLists/TrustedRelayListEvent.kt | 2 +- .../vitorpamplona/quartz/nip51Lists/relaySets/RelaySetEvent.kt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip37Drafts/privateOutbox/PrivateOutboxRelayListEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip37Drafts/privateOutbox/PrivateOutboxRelayListEvent.kt index 05a93432b..24889ffb0 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip37Drafts/privateOutbox/PrivateOutboxRelayListEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip37Drafts/privateOutbox/PrivateOutboxRelayListEvent.kt @@ -78,7 +78,7 @@ class PrivateOutboxRelayListEvent( val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) } diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip50Search/SearchRelayListEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip50Search/SearchRelayListEvent.kt index 6dd52abc3..f910a3b3f 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip50Search/SearchRelayListEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip50Search/SearchRelayListEvent.kt @@ -79,7 +79,7 @@ class SearchRelayListEvent( val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) } diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BlockedRelayListEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BlockedRelayListEvent.kt index 10f12efd5..60845fbcb 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BlockedRelayListEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BlockedRelayListEvent.kt @@ -77,7 +77,7 @@ class BlockedRelayListEvent( val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) } diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BroadcastRelayListEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BroadcastRelayListEvent.kt index 8ec975610..b433b041a 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BroadcastRelayListEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/BroadcastRelayListEvent.kt @@ -77,7 +77,7 @@ class BroadcastRelayListEvent( val newRelayList = relays.map { RelayTag.assemble(it) } val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) } diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/IndexerRelayListEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/IndexerRelayListEvent.kt index 05b2327b6..d21d07f5c 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/IndexerRelayListEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/IndexerRelayListEvent.kt @@ -78,7 +78,7 @@ class IndexerRelayListEvent( val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) } diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/ProxyRelayListEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/ProxyRelayListEvent.kt index 7f48f3fc4..f4d7b9447 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/ProxyRelayListEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/ProxyRelayListEvent.kt @@ -78,7 +78,7 @@ class ProxyRelayListEvent( val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) } diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/TrustedRelayListEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/TrustedRelayListEvent.kt index 7fd826246..9764a55a6 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/TrustedRelayListEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relayLists/TrustedRelayListEvent.kt @@ -78,7 +78,7 @@ class TrustedRelayListEvent( val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) } diff --git a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relaySets/RelaySetEvent.kt b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relaySets/RelaySetEvent.kt index 5866237ee..7580d314a 100644 --- a/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relaySets/RelaySetEvent.kt +++ b/quartz/src/androidMain/kotlin/com/vitorpamplona/quartz/nip51Lists/relaySets/RelaySetEvent.kt @@ -73,7 +73,7 @@ class RelaySetEvent( val privateTags = earlierVersion.privateTags(signer) ?: throw SignerExceptions.UnauthorizedDecryptionException() val publicTags = earlierVersion.tags.remove(RelayTag::match) - val newPrivateTags = privateTags.remove(RelayTag::notMatch).plus(newRelayList) + val newPrivateTags = privateTags.remove(RelayTag::match).plus(newRelayList) return signer.signNip51List(createdAt, KIND, publicTags, newPrivateTags) }