nostr-protocol / nips

Nostr Implementation Possibilities
2.4k stars 583 forks source link

[Request] Add category or genre to NIP-28 Public Chat (Kind 41 metadata or new kind) #1417

Open ShinoharaTa opened 3 months ago

ShinoharaTa commented 3 months ago

Overview

This request proposes adding category or genre information to NIP-28 Public Chat. By implementing this, chats can be categorized based on their content, allowing users to quickly access topics of interest.

Proposal

I propose introducing a field for category or genre in the current NIP-28 Public Chat specification. This field can be added to the existing Kind 41 metadata or defined as a new Kind.

ex. Kind 41

{
  "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
  "tags": [
    ["e", <channel_create_event_id>, <relay-url>],
    ["category", <category_name-1>, <category_name-2>, <category_name-3>],
  ],
  ...
}

ex. Kind xx

{
  "content": "[<category_name>, <category_name>, <category_name>, <category_name>... ]",
  "tags": [["e", <channel_create_event_id>, <relay-url>]],
  ...
}

Benefits

Enhanced User Experience: Categorizing chats by category or genre will make it easier for users to access relevant topics. Organized Content: Providing chats in a more organized manner will improve the quality of information sharing within the community.

nikolat commented 3 months ago

Wouldn't it be better to reuse t tags than to create new category tags? Tag names that are not single characters cannot be searched by the query.

{
  "kind": 41,
  "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\"}",
  "tags": [
    ["e", <channel_create_event_id>, <relay-url>, "root"],
    ["t", <category_name-1>],
    ["t", <category_name-2>],
    ["t", <category_name-3>],
  ],
  ...other fields
}