Muted list via NIP-51 #151
No reviewers
Labels
No Label
1000k
100k
10k
200k
20k
500k
50k
5k
75k
backend
blocked:design
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
scope:intl
scope:nip
scope:query_tracing
scope:ux
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kieran/snort#151
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mute"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Wanted to get some feedback on this, I think having a public mute list and the possibility to batch mute people is good, I can see who you've muted and preemptively mute them, wdyt?
I'm going to add a "Block" option (private mute) that stores the list of blocked
p
in the encrypted content field so we get public/private blocks. Not going to tackle other types of lists in this PR, just focused on mute list forp
which I think is the most valuable atm. We can add pins and bookmarks later.Closes #101
Link to NIP PR: https://github.com/nostr-protocol/nips/pull/183
Small bits, looks good though
@ -0,0 +8,4 @@
import useModeration from "Hooks/useModeration";
export interface MutedListProps {
pubkey: HexKey
Bit confusing when you have the logged in users pubkey in same scope, maybe call it
forPubKey
or somethingMaybe need something here to show that its muted like you get on twitter
@ -41,3 +45,3 @@
return <Note key={e.id} data={e} related={related.notes} />
return <Note key={e.id} data={e} related={related.notes} ignoreModeration={ignoreModeration} />
}
case EventKind.Reaction:
The p tag can be checked inside i think
@ -95,6 +96,28 @@ export default function useEventPublisher() {
}
MUTE_LIST_TAG
can be enum probably, we will have other lists tooFilter dms too?
I should probably make it easier to get latest only notes, instead of NoteStore returning all it only gives back newest, this pattern is used a lot
I dont think the index is important, you can just pick all
p
tagsreturn ["d"..
We can filter this directly from login feed, not needed here
Yea i want to move this, too many clicks, need to put this directly on Settings page under "Donate"
Deploying with Cloudflare Pages
5e0b36f
View logs
@ -0,0 +8,4 @@
import useModeration from "Hooks/useModeration";
export interface MutedListProps {
pubkey: HexKey
Change this a bit, the
MutedList
component will show public mutes for users different that the logged in user. For logged in user addedBlockList
which displays public (mute) and private (block) muted.I've decided against it since we don't always have
muted
list available by the time we start getting dm events. Doing filtering on the downstream components instead.For notes I added the
HiddenNote
, do you think is worth adding for reactions too? thought we could just hide them since they can get spammyGood point
We dont show pure reactions currently, only reposts, im thinking of reposts where the person being reposted in muted, if the reposter is muted then you wont see it anyway because it will be removed at timeline/thread level
If you had a really long mute list then you would have to scroll for a long time to get to blocks, should we not have seperate tab for when its the logged in users block list?
Better to use
ev.Tags
here because you have 2 ways to pass the event data@ -51,3 +53,4 @@
const root = extractRoot();
const isOpMuted = root && isMuted(root.pubkey)
const opt = {
showHeader: ev?.Kind === EventKind.Repost,
the
p
tag check androot.pubkey
should be the same, do you think its needed to have both checks?You can use only the start of the pubkey here, so the id is a bit snorter
@ -51,3 +53,4 @@
const root = extractRoot();
const isOpMuted = root && isMuted(root.pubkey)
const opt = {
showHeader: ev?.Kind === EventKind.Repost,
No, my bad
i see what you did there ✨
When i click onto the muted persons profile it should show notes anyway?
good point, changed it so when visiting Profile the moderation is ignored.