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

NIP5: Add some field for specifying the kind of direct message #83

Closed
arejula27 opened this issue Nov 30, 2022 · 8 comments
Closed

NIP5: Add some field for specifying the kind of direct message #83

arejula27 opened this issue Nov 30, 2022 · 8 comments

Comments

@arejula27
Copy link

The direct message is a way to intereact with other person, however it could be in many ways: direct chat, mail or whatever u want. I think it would be appropiated to add a field for specifying the kind o encrypted message it is, so if you are building a chat app u can filter this kind of message or if you are doing a mail app (my case) you can filter them.

@arejula27
Copy link
Author

Another option could be separate them on different event kinds, i dont think it is the best option because both are the same event (encrypted for 2 people), the only difference is the type of communication it is, one more instantaneous and other more polite.

@arejula27
Copy link
Author

In my opinion with a tag will be enough, however i wrote this issue for discuss a standardized tag, so every app could use it, not only mine.

@eskema
Copy link
Collaborator

eskema commented Nov 30, 2022

I don't underestand what you're trying to do, is this to know what is the user preferred way to get contacted? like kind-1 vs kind-4?

@arejula27
Copy link
Author

The idea is to specify the structure of the content, it could be a simple sentence or a JSON {title:string, text:string} or whatever the client prefer. So with this tag the clients would decode correctly.

@arejula27
Copy link
Author

Maybe my explanation was terrible at the begining :\

@eskema
Copy link
Collaborator

eskema commented Nov 30, 2022

encodings and structures are better suited for specific kinds, otherwise you pollute clients with unreadable data where it shouldn't. If you want a specific format, you write a new kind for it and use that instead of forcing clients to use your own.
You can create a new kind that is structure agnostic but expects something in the form of a tag, like you describe, but in it's own kind an not kind traversal if that makes sense

@arejula27
Copy link
Author

Okay, how i select a new number? I will write a pr then

@eskema
Copy link
Collaborator

eskema commented Nov 30, 2022

write the nip without a number, the number will reveal itself after

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

No branches or pull requests

2 participants