Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 94 add a d tag to event #1532

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

haorendashu
Copy link
Contributor

@haorendashu haorendashu commented Oct 11, 2024

Add a d tag to file metadata event and it will make this event replacable.
It means that the file can moving between media services.

You can vist updates easy from here: https://github.com/haorendashu/nips/blob/Replacable-File-Metadata/94.md

use cases

  • Use as a movable media for notes.
    1. Clients upload a file to media service and get a file link and other file infomations.
    2. Clients send a File Metadata event and this event must contain a d tag, it means that this event is addressable.
    3. If a client want to sends notes with this file, it should imports this event with nostr:naddr style uri.
    4. When other clients vist a note with kind 1063 naddr style uri, it should find this event and display it like a normal media file.
    5. If this file's owner want to change the media service, he can upload this file to other media service and resend a File Metadata event with the same d tag.

Add a d tag to file metadata event and it will make this event replacable.
It means that the file can moving between media services.
@bezysoftware
Copy link
Contributor

Adding a d tag to event does not make it replaceable (you actually mean addressable). Only changing the kind number to an addressable range does that, see https://github.com/nostr-protocol/nips/blob/master/01.md#kinds

@haorendashu
Copy link
Contributor Author

Thanks @bezysoftware , replaceable had change to addressable.
But, should i change the event kind too ? This kind had used for a long time.
Maybe i should add a new kind event ?

@vitorpamplona
Copy link
Collaborator

You can simply send a deletion request to the old event id and republish a new kind 1063.

No changes are needed for the NIP

@arthurfranca
Copy link
Contributor

arthurfranca commented Oct 11, 2024

The idea is great and it was proposed before by the strfry creator.

The idea is for relays to treat ANY event kind (on this PR it is just for kind:1063) as addressable as long as the event has a d tag.

Note: Unlike what others readily think, it would NOT make kind:1 editable and break nostr simplicity, because clients would still fetch kind:1 events by id (instead of by kind+author+d-tag).

Bonus (from the old proposal): Tell relays to treat received expired events (expiration tag < created_at||now) as ephemeral then we can get rid of the event ranges definitions.

@haorendashu
Copy link
Contributor Author

@vitorpamplona If i only simply delete the old event and resend one. Those notes which imported this event will can't visit this media file.

But if this event contains a d tag and clients searching this event by d tag. When i move this file from one service to another service, i only need to send a new event with the same d tag and the new link.

Those events which had imported this event can still visit this media file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants