Replies: 1 comment 8 replies
-
Agree, I am currently working with https://github.com/vitorpamplona/nips/blob/relationship-status/81.md to better document these types of notifications. In your case, you would use the public event to build a list of follows. {
"kind": 30382,
"tags": [
["d", "<friend's pubkey>"],
["n", "Follows"]
],
"content": nip44Encrypt(JSON.stringify([
["petname", "friend's private petname"]
])),
// ...other fields
} Here you can just keep track of all d-tags pointing to your user and you will get every change to them. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not all users would need this feature, but I'd like to have it.
Currently, the follow list of each user is managed trough NIP-02. A single replaceable kind
3
event lists all users that the author is following.This is a good system. Retrieving the follow list of a user is trivial.
However, there is effectively no way of knowing when one has a new follower, except by polling the list of followers, which will be both inefficient and somewhat challenging to do.
Personally, I would like to know when I have a new follower.
I suggest that there should be a new kind of event that is produced when a user follows a new account.
This event can then be used by clients to show a "You have been followed by [user]" notification, which can be enabled or disabled by changing the client's settings.
The follow event should only be considered valid, by the client, if the author actually does (still) follow the user (which is checked by retrieving the relevant kind
3
event). No notification is displayed otherwise. Relays are also free to delete follow events which are or become invalid.A user may follow another account multiple times. In this case, only the most recent follow event is considered valid.
This wouldn't require changing anything in NIP-02 and anything which works well with kind
3
events will continue to.Beta Was this translation helpful? Give feedback.
All reactions