-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Don't follow self, blocks or mute when following all; don't show blocks in list #4715
Conversation
Your Render PR Server URL is https://social-app-pr-4715.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cq1iro56l47c73bg0p90. |
|
.filter(p => !p.associated?.labeler) | ||
.filter( | ||
p => | ||
!p.viewer?.blockedBy && !p.viewer?.blocking && !p.associated?.labeler, |
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.
is this logic copypaste from somewhere? any reference points?
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.
idt so (in either this case or the one below). this is the one weird place where we actually don't filter the blocks out on the server because of how other lists work. we could extract it to a function if we want to though even if it doesn't get used much/ever again.
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.
(probably something like isBlockedOrMuted()
?)
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.
did that, though made them two separate things (blocked vs muted)
.filter(li => !li.subject.viewer?.following) | ||
.filter( | ||
li => | ||
li.subject.did !== currentAccount?.did && |
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.
same q
Why
Simple, just don't follow yourself (still love that you can do this lol) whenever pressing Follow All in a starter pack. You also shouldn't follow people you have muted or are blocking/blocked by.
Similarly, don't show blocks in the list of profiles - lists actually return blocked accounts (behavior of mute lists) so we need to filter here.
Test Plan
Follow all on a starter pack, see that you no longer follow yourself or blocks/mutes. Also see that blocked accounts don't show up in the list of profiles.