nostr-tool
nostr-tool copied to clipboard
fix: fetch existing kind 0 data if some fields are missing a value for update-metadata
As it is now, the update-metadata command will fully overwrite existing kind 0 fields as relays may delete older kind 0 events upon receiving a new one for the same pubkey, as defined in NIP-01. We should probably by default try to fetch the users existing kind 0 data and replace the fields the user specified in the command before publishing the event.
We could also add a flag the user can set to not fetch existing metdata if they want to delete some of the fields.