mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-28 21:53:01 +02:00
Overrides pubkey to avoid impersonators on seals.
This commit is contained in:
@@ -137,7 +137,7 @@ class Gossip(
|
|||||||
val content: String?,
|
val content: String?,
|
||||||
) {
|
) {
|
||||||
fun mergeWith(event: SealedGossipEvent): Event {
|
fun mergeWith(event: SealedGossipEvent): Event {
|
||||||
val newPubKey = pubKey?.ifBlank { null } ?: event.pubKey
|
val newPubKey = event.pubKey // forces to be the pubkey of the seal to make sure impersonators don't impersonate
|
||||||
val newCreatedAt = if (createdAt != null && createdAt > 1000) createdAt else event.createdAt
|
val newCreatedAt = if (createdAt != null && createdAt > 1000) createdAt else event.createdAt
|
||||||
val newKind = kind ?: -1
|
val newKind = kind ?: -1
|
||||||
val newTags = (tags ?: emptyArray()).plus(event.tags)
|
val newTags = (tags ?: emptyArray()).plus(event.tags)
|
||||||
|
Reference in New Issue
Block a user