upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarthurfranca <arthur.a.franca@gmail.com>2023-03-22 10:13:04 -0300
committerarthurfranca <arthur.a.franca@gmail.com>2023-03-22 10:13:04 -0300
commita32ec25ecb5cb13754e435db01ef6bf2a749769c (patch)
treec68d28c16da2c6902a7a994e0486bae2d27fa91e
parent8b158e92279c08af812307ed7294378ddb8abbdd (diff)
Make it clear why e tags are discouraged
-rw-r--r--27.md11
-rw-r--r--README.md2
2 files changed, 7 insertions, 6 deletions
diff --git a/27.md b/27.md
index b2d1e5a..237feaa 100644
--- a/27.md
+++ b/27.md
@@ -1,17 +1,18 @@
1NIP-27 1NIP-27
2====== 2======
3 3
4Handling Mentions 4Text Note References
5----------------- 5--------------------
6 6
7`draft` `optional` `author:fiatjaf` `author:scsibug` `author:arthurfranca` 7`draft` `optional` `author:fiatjaf` `author:scsibug` `author:arthurfranca`
8 8
9This document standardizes the treatment given by clients of inline mentions of other events and pubkeys inside the content of `text_note`s. 9This document standardizes the treatment given by clients of inline references of other events and pubkeys inside the content of `text notes` (currently kinds 1 and 30023).
10 10
11Clients that want to allow inline mentions they MUST show an autocomplete component or something analogous to that whenever the user starts typing a special key (for example, "@") or presses some button to include a mention etc -- or these clients can come up with other ways to unambiguously differentiate between mentions and normal text. 11Clients that want to allow inline mentions of profiles MUST show an autocomplete component or something analogous to that whenever the user starts typing a special key (for example, "@") or presses some button to include a mention etc -- or these clients can come up with other ways to unambiguously differentiate between mentions and normal text.
12 12
13Once a mention is identified, for example, the pubkey `27866e9d854c78ae625b867eefdfa9580434bc3e675be08d2acb526610d96fbe`, the client MUST replace its textual reference (inside `.content`) with the notation `nostr:nprofile1qqsw3dy8cpu...6x2argwghx6egsqstvg` as per NIP-21. If client doesn't support NIP-21, it can instead use a regular http link to a nostr client such as `https://snort.social/p/nprofile1qqsw3dy8cpu...6x2argwghx6egsqstvg`. The client MAY add that pubkey to the `.tags` with the tag `p` if it wishes to notify mentioned user. 13Once a mention is identified, for example, the pubkey `27866e9d854c78ae625b867eefdfa9580434bc3e675be08d2acb526610d96fbe`, the client MUST replace its textual reference (inside `.content`) with the notation `nostr:nprofile1qqsw3dy8cpu...6x2argwghx6egsqstvg` as per NIP-21. If client doesn't support NIP-21, it can instead use a regular http link to a nostr client such as `https://snort.social/p/nprofile1qqsw3dy8cpu...6x2argwghx6egsqstvg`. The client MAY add that pubkey to the `.tags` with the tag `p` if it wishes to notify mentioned user.
14 14
15The same process applies for mentioning event IDs, except that the client SHOULD NOT add the event id to the `.tags` with the tag `e` so to not negatively impact thread loading. 15The same process applies for referencing event IDs, except that the client SHOULD NOT add the event id to the `.tags` with the tag `e` so to not negatively impact thread loading.
16Because `e` tags on `text notes` are usually considered ancestor events used to build a conversarion thread (as per NIP-10), it is advised to use inline references when mentioning events and NOT adding corresponding `e` tag to the `.tags` event key.
16 17
17A client that receives a `text_note` event with such `nostr:...` mentions in its `.content` CAN do any desired context augmentation (for example, linking to the pubkey or showing a preview of the mentioned event contents) it wants in the process. 18A client that receives a `text_note` event with such `nostr:...` mentions in its `.content` CAN do any desired context augmentation (for example, linking to the pubkey or showing a preview of the mentioned event contents) it wants in the process.
diff --git a/README.md b/README.md
index d93f5c2..6642e92 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh
25- [NIP-23: Long-form Content](23.md) 25- [NIP-23: Long-form Content](23.md)
26- [NIP-25: Reactions](25.md) 26- [NIP-25: Reactions](25.md)
27- [NIP-26: Delegated Event Signing](26.md) 27- [NIP-26: Delegated Event Signing](26.md)
28- [NIP-27: Handling Mentions](27.md) 28- [NIP-27: Text Note References](27.md)
29- [NIP-28: Public Chat](28.md) 29- [NIP-28: Public Chat](28.md)
30- [NIP-33: Parameterized Replaceable Events](33.md) 30- [NIP-33: Parameterized Replaceable Events](33.md)
31- [NIP-36: Sensitive Content](36.md) 31- [NIP-36: Sensitive Content](36.md)