Fixes inability to delete relays from certain relay lists.

This commit is contained in:
Vitor Pamplona
2025-08-29 07:38:18 -04:00
parent a594d741b1
commit 60377c0c35
8 changed files with 8 additions and 8 deletions
@@ -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)
}
@@ -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)
}
@@ -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)
}
@@ -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)
}
@@ -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)
}
@@ -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)
}
@@ -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)
}
@@ -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)
}