It's very simple. Private block:
{
kind: 16462,
content: nip04.encrypt(myPriv, myPub, JSON.stringify(privateBlockedUsersArray))
}
Public block:
{
kind: 16463,
content: JSON.stringify(publicBlockedUsersArray)
}
I picked the kind by random from the replaceable events range.
Any improvements are welcome. One thing that comes to mind is recording the reason or expiry date for block. If such additional attributes are needed, object might be better than array.
would you consider using the nip I linked above? have you had a chance to review it? its written to be extensible for events, hashtags, users. and to allow users to create lists other than just mute that they can name themselves.
also I don't think its appropriate for nip04 encryption scheme here..? isn't this only for when shared secret is needed?
Thread collapsed
Thread collapsed
also how do you query for public blocks if the user list is in the content and not the tags..?
Thread collapsed
just a thought looking at this, why not keep everything in the same event and have the public be in tags and private in encrypted content? would that simplify or complicate?
this is a really neat idea. might suggest this in the encrypted lists pr, so it could public and private lists
Thread collapsed
Thread collapsed