feat: client tags

This commit is contained in:
2025-04-30 11:14:02 +01:00
parent f028de7c04
commit e6ca368134
10 changed files with 61 additions and 33 deletions

View File

@ -150,7 +150,11 @@ export class NostrLink implements ToNostrEventTag {
const ifSetCheck = <T>(a: T | undefined, b: T) => {
return !Boolean(a) || a === b;
};
return (EventExt.isReplaceable(ev.kind) || ifSetCheck(this.id, ev.id)) && ifSetCheck(this.author, ev.pubkey) && ifSetCheck(this.kind, ev.kind);
return (
(EventExt.isReplaceable(ev.kind) || ifSetCheck(this.id, ev.id)) &&
ifSetCheck(this.author, ev.pubkey) &&
ifSetCheck(this.kind, ev.kind)
);
}
return false;