Browse Source

add nip10 marker to boosts

damus web will use these instead of relying on the content which will be
optional
profile-edit
William Casarin 2 years ago
parent
commit
d942b823b2
  1. 3
      damus/Nostr/NostrEvent.swift

3
damus/Nostr/NostrEvent.swift

@ -519,7 +519,8 @@ func make_metadata_event(keypair: Keypair, metadata: NostrMetadata) -> NostrEven
func make_boost_event(pubkey: String, privkey: String, boosted: NostrEvent) -> NostrEvent {
var tags: [[String]] = boosted.tags.filter { tag in tag.count >= 2 && (tag[0] == "e" || tag[0] == "p") }
tags.append(["e", boosted.id])
tags.append(["e", boosted.id, "", "root"])
tags.append(["p", boosted.pubkey])
let ev = NostrEvent(content: event_to_json(ev: boosted), pubkey: pubkey, kind: 6, tags: tags)

Loading…
Cancel
Save