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

[NIP-01] Hint at the format of an event’s content #33

Closed
lenormf opened this issue Nov 23, 2021 · 2 comments
Closed

[NIP-01] Hint at the format of an event’s content #33

lenormf opened this issue Nov 23, 2021 · 2 comments

Comments

@lenormf
Copy link

lenormf commented Nov 23, 2021

Should events have a field that hints at the format of their contents? It could be a MIME type or one of the only formats (Markdown?) accepted by the protocol.

Or should relay try to guess the format using heuristic, the same way the file utility does?

@fiatjaf
Copy link
Member

fiatjaf commented Nov 23, 2021

Event contents should be specified in the NIP according to their kind. That's the point of having different kinds.

If an application is using a nonstandard event kind then it will still know the event format because it would be something they invented. And then that can be standardized later so other applications can learn the format.

@lenormf
Copy link
Author

lenormf commented Nov 24, 2021

The NIP indicates that content is text, and nothing else. A user posting an essay/article might want to publish it in Markdown (for example), but the relay might display it unformatted.

Having a field that hints at the format of content would allow relays to notify clients how to render text on their UI, instead of plain text by default.

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