upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2023-11-22 10:15:11 -0300
committerfiatjaf <fiatjaf@gmail.com>2024-02-23 20:51:46 -0300
commit50db74f93a1c46cc884d91beaa6b7be05a6079ff (patch)
tree9318deb9418ff0933514c1594907b81fbd766b3e
parent3e638eac5f02cb2f2508514dda1d8f12db117c45 (diff)
`public` and `open` tags and join request event.
-rw-r--r--29.md27
1 files changed, 23 insertions, 4 deletions
diff --git a/29.md b/29.md
index 623e15f..93b0edf 100644
--- a/29.md
+++ b/29.md
@@ -66,17 +66,32 @@ Similar to `kind:11`, this is the basic unit of a chat message sent to a group.
66 ... 66 ...
67``` 67```
68 68
69- *moderation events* (`kinds:5;9000-9020`) (optional) 69- *join request* (`kind:9021`)
70
71Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them.
72
73```js
74{
75 "kind": 9021,
76 "content": "optional reason",
77 "tags": [
78 ["h", "<group-id>"],
79 ["alt", "optional action description"]
80 ]
81}
82```
83
84- *moderation events* (`kinds:9000-9020`) (optional)
70 85
71Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log. 86Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log.
72 87
73```js 88```js
74{ 89{
75 "kind": 90xx, 90 "kind": 90xx,
76 "content": "", 91 "content": "optional reason",
77 "tags": [ 92 "tags": [
78 ["h", "<group-id>"], 93 ["h", "<group-id>"],
79 ["alt", "optional action description and/or reason"], 94 ["alt", "optional action description"],
80 ["previous", ...] 95 ["previous", ...]
81 ] 96 ]
82} 97}
@@ -107,12 +122,16 @@ If the group is forked and hosted in multiple relays, there will be multiple ver
107 ["d", "<group-id>"], 122 ["d", "<group-id>"],
108 ["name", "Pizza Lovers"], 123 ["name", "Pizza Lovers"],
109 ["picture", "https://pizza.com/pizza.png"], 124 ["picture", "https://pizza.com/pizza.png"],
110 ["about", "a group for people who love pizza"] 125 ["about", "a group for people who love pizza"],
126 ["public"],
127 ["open"]
111 ] 128 ]
112 ... 129 ...
113} 130}
114``` 131```
115 132
133`name`, `picture` and `about` are basic metadata for the group for display purposes. `public` signals the group can be _read_ by anyone. `open` signals that anyone can request to join and the request will be automatically granted.
134
116The [NIP-19](19.md) `naddr` pointer for this event including with a mandatory relay can be used as the canonical group identifier. 135The [NIP-19](19.md) `naddr` pointer for this event including with a mandatory relay can be used as the canonical group identifier.
117 136
118- *group admins* (`kind:39001`) (optional) 137- *group admins* (`kind:39001`) (optional)