add restricted to standardized machine-readable prefixes#1685
add restricted to standardized machine-readable prefixes#1685fiatjaf merged 1 commit intonostr-protocol:masterfrom
Conversation
|
I am currently using Are you actually parsing these machine readable prefixes and mapping them to certain behavior in a client? Is anyone? Are you working on a project where having this solves a specific problem? I agree with you on the meaning of the words. |
|
Chorus has been using "restricted" for a long time now. I think it is reasonable. However, gossip doesn't parse or use the machine readable prefixes, it just prints the whole message out. |
@alexgleason Regarding the In my opinion, machine-readable prefixes are more useful in the internal codes of clients or bots. Many services, like NIP-47 (NWC) and other platforms that interact with relays, can parse errors and utilize the prefix section to determine the appropriate internal actions. Meanwhile, the explanation part can be displayed to the end user in a human-readable format. If there isn’t an end user, such as in the case of scripts or bots, the prefixed part can be leveraged to make optimal decisions and take the best actions. |
|
In my opinion:
|
The
restrictedprefix is useful in situations where an individual is not whitelisted to write on a relay or has been banned from it.For example, Immortal (websocket/event_handler.go#L125) uses a restricted prefix to send a message when someone who is not whitelisted tries to write on the relay, provided that the whitelist feature is enabled in the configurations.
Additionally, if this event is sent on nostr.wine:
the response will be: