-
Notifications
You must be signed in to change notification settings - Fork 770
Draft for NIP-73 meetup communities #825
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| NIP-73 | ||
| ====== | ||
|
|
||
| Location Based Communities (Meetup Style) | ||
| ------------------------------------ | ||
|
|
||
| `draft` `optional` `author:brighton_btc` | ||
|
|
||
| The purpose of this NIP is to create location based communities that allow for some light moderation, leverage NIP-52 time based calendar events for the creation of in-person meetup events, NIP-51 lists for membership and moderation, and NIP-28 for community chat. | ||
|
|
||
| # Community creation event: | ||
| New communities are created with a `Kind:1037` event. This event acts as an anchor point for other event kinds associated with the community | ||
|
|
||
| ```json | ||
| { | ||
| "content": <Optional description>, | ||
| "created_at": <Unix timestamp in seconds>, | ||
| "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| "kind": 1037, | ||
| "pubkey": <32-bytes lowercase hex-encoded public key of the event creator> | ||
| } | ||
| ``` | ||
|
|
||
| # Community metadata: | ||
|
|
||
| Community metadata can be created or updated with a `Kind:30037` event. It should use the ID of the associated `Kind:1037` as its `d` tag. | ||
|
|
||
| ```json | ||
| { | ||
| "content": <description of community, markdown formatted>, | ||
| "created_at": <Unix timestamp in seconds>, | ||
| "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| "kind": 30037, | ||
| "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| "tags": [ | ||
| ["title", <Community name>], | ||
| ["d", <UID, ID of the associated 1037 event >], | ||
| ["image", <optional image URL>], | ||
| ["g", <geohash>, "geohash"], | ||
| ["g", <Alpha2 Country Code:City Name>, "city"], // eg "GB:Brighton" | ||
| ["t", <string>] // can be multiple t tags | ||
| ] | ||
| } | ||
|
|
||
| ``` | ||
|
|
||
| # Following communities | ||
|
|
||
| Users follow communities by adding the `Kind:1037` (Community creation event) id as an `e` tag to a `Kind:10037` event. | ||
|
|
||
| Users can also add extra metadata, such as location `g` tags, to this event. This enables clients to build in discoverability options for their users. | ||
|
|
||
| ```json | ||
| { | ||
| "content": <User status>, // optional | ||
| "created_at": <Unix timestamp in seconds>, | ||
| "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| "kind": 10037, | ||
| "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| "tags": [ | ||
| ["e", <id of an associated 1037 event>], | ||
| ["e", <another id of an associated 1037 event>], | ||
| // etc... | ||
|
|
||
| // Suggested optional tags: | ||
| ["locationStatus", <living | visiting>], | ||
| ["g", <Alpha2:City>, "city"], // eg "GB:Brighton" | ||
| ["t", <topic 1>], | ||
| ["t", <topic 2>] | ||
| // etc... | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| # Time-Based Calendar Event (NIP-52): | ||
|
|
||
| The owner of a community can create `Kind:31923` calendar events to represent location based, in person, meetup events. It's `d` tag should be the ID of the associated `Kind:1037` event. | ||
|
|
||
| In addition to the fields mentioned in NIP-52 there is also the following: | ||
|
|
||
| - an additional "g" tag formatted as the city g tags above. ie. Alpha2:City Name. This makes it possible to search by city. | ||
| - an ["L" , "kind"] and ["l", "meetup", "kind"] tag so that these evnts can be differentiated from those that don'e have a community associated with them | ||
| - an optional "brief" tag, for a short description of the event | ||
|
|
||
| This gives us: | ||
|
|
||
| ```json | ||
| { | ||
| "content": <markdown formatted event description>, | ||
| "created_at": <Unix timestamp in seconds>, | ||
| "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| "kind": 31923, | ||
| "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| "tags": [ | ||
| ["d", <UID, ID of the associated 1037 event >], | ||
|
|
||
| ["name", <name of calendar event>], | ||
|
|
||
| // Dates | ||
| ["start", <Unix timestamp in seconds>], | ||
| ["end", <Unix timestamp in seconds>], | ||
|
|
||
| // Location | ||
| ["location", "<location>"], | ||
| ["g", <geohash>, "geohash"], | ||
| ["g", <Alpha2:City>, "city"], | ||
|
|
||
| // Hashtags | ||
| ["t", "<tag>"], | ||
| ["t", "<tag>"], | ||
|
|
||
| // addition fields | ||
| ["brief", <brief description>], | ||
| ["e", <id of the associated 1037 event>], | ||
| ["L", "kind" ], | ||
| ["l", "meetup", "kind"], | ||
|
|
||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| # RSVPing to community events | ||
|
|
||
| See NIP-52 `Kind:31925` events | ||
|
|
||
| # Community moderation | ||
|
|
||
| A user can be considered as one of 3 levels by a community: follower, member, or muted. | ||
|
|
||
| - **Member** - Is following the community (community ID exists in the users `Kind:10037` list) AND the users hex public key exists in the community's `Kind:30000` member list. | ||
| - **Follower** - Is following the community (community ID exists in the users `Kind:10037` list) BUT the users hex public key DOESN'T exist in the community's `Kind:30000` member list. | ||
| - **Muted** - Is following the community (community ID exists in the users `Kind:10037` list) AND the users hex public key exists in the community's `Kind:30000` block list. | ||
|
|
||
| The community owner manages 2 `Kind:30000` (NIP-51) lists, one for members, one for muted/blocked users. The member event should include a `d` tag that mirrors the ID of the associated `Kind:1037`, and the muted list should be the `Kind:1037` with `:blocked` appended. | ||
|
|
||
| ### Member list | ||
|
|
||
| ```json | ||
|
|
||
| "kind": 30000, | ||
| "tags": [ | ||
| ["d", <UID, ID of the associated 1037 event >], | ||
| ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
| ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"], | ||
| // ...etc. | ||
| ] | ||
| ``` | ||
|
|
||
| ### Muted list | ||
|
|
||
| ```json | ||
|
|
||
| "kind": 30000, | ||
| "tags": [ | ||
| ["d", <UID, ID of the associated 1037 event > + ":blocked"], | ||
| ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], | ||
| ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"], | ||
| // ...etc. | ||
| ] | ||
| ``` | ||
|
|
||
|
|
||
| # Community Chat | ||
|
|
||
| Community chat can be implemented using NIP-28. The `Kind:40` chat creation event should include include an `e` tag that references the community `Kind:1037` event. Chat can be moderated as described above in the Community moderation section. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
altmight be a more standard way to do this