-
Notifications
You must be signed in to change notification settings - Fork 582
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
kind-scoped follow #1605
base: master
Are you sure you want to change the base?
kind-scoped follow #1605
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
NIP-FA | ||
====== | ||
|
||
Kind-scoped follows | ||
------------------- | ||
|
||
`draft` `optional` | ||
|
||
This NIP defines kind `967`, a kind-scoped follow event. | ||
|
||
```jsonc | ||
{ | ||
"kind": 967, | ||
"tags": [ | ||
["p", "<followed-pubkey>", 'relay-url'], | ||
["k", "<some-kind>"], | ||
["k", "<some-other-kind>"] | ||
] | ||
} | ||
``` | ||
|
||
Multiple `p` tags and multiple `k` tags are allowed. | ||
|
||
The `k` tag(s) define the scope of the follows. | ||
|
||
### Unfollow action | ||
|
||
Unfollowing is done by deleting the follow event, copying over the `k` tags from the follow event. | ||
|
||
```jsonc | ||
{ | ||
"kind": 5, | ||
"tags": [ | ||
["e", "<follow-event-id>"], | ||
["k", "<some-kind>"], | ||
["k", "<some-other-kind>"] | ||
] | ||
} | ||
``` | ||
Comment on lines
+28
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is it necessary to copy the "k" tags? isn't this just a normal delete? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. allows a client that didn't do the delete to know that it's local state should be updated |
||
|
||
### Constructing specialized follow lists | ||
|
||
A client can fetch the events of the kinds they are interested in, and perhaps adjacent kinds if they choose to. For example, a client specialized in videos might also want to extend its computed follow list to include events related to live streams. | ||
|
||
Clients can use the last `kind:967` and `kind:5` tagged with a `k` they care about and use the last `created_at` they have seen to REQ for updates. |
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.
should we encourage multiple kinds per follow events? isn't it better to have a different follow event for each kind such that they can be fetched and deleted independently?
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.
that will likely get too hairy; an app that supports 4 different kinds now needs to read/write 4x the number of events -- I think there's not enough benefit to forcing so much granularity and an app could just delete the event that has more kinds that it knows what to do and recreate with the kinds it doesn't understand (although even that might not even be an overkill)
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.
but then we're back to lost followers again.
and also weird situations in which the same user will be following the same person multiple times because different apps have created different follow events, some bundled, some unbundled.
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.
not a big deal
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.
If an app misbehaves and deletes beyond what it should then it's a misbehaving app, but even within a misbehaving app, accidentally unfollowing someone across more use cases than the user intended to is FAR less problematic than unfollowing everyone across all use cases
An app that is interested in kind:20 will REQ for #k: "20", if it finds a follow it will use it, regardless of the fact that there are other
k
s in the follow event -- it will just ignore them, so it will show that person as followed.Obviously when an app computes the
authors
filter based on the follow list it computed then it must make the list unique, but that's already pretty basic, same as if you have the same pubkey in a kind:3 which is also a thingThere 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.
ok, so apps must keep track of the event ids they're using to build their internal follow lists, right?
that means these same apps won't need
k
tags on thekind:5
events in order to interpret an unfollow correctly (merging this with the other thread).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.
if the unfollow is a delete and some other app deletes the follow event then they can't know the unfollow happened
they way I'm thinking about it is the app queries with
REQ with
{ "kinds": [5], "#k": ["967"], "since": last-known-unfollow }