Fixes inability to delete relays from certain relay lists.
This commit is contained in:
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user