Skip to content
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

Merged
merged 4 commits into from
Jul 3, 2024

Conversation

haileyok
Copy link
Contributor

@haileyok haileyok commented Jul 1, 2024

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.

Copy link

render bot commented Jul 1, 2024

Copy link

github-actions bot commented Jul 1, 2024

Old size New size Diff
6.49 MB 6.49 MB 293 B (0.00%)

@haileyok haileyok changed the title Don't follow self when following all Don't follow self, blocks or mute when following all; don't show blocks in list Jul 1, 2024
.filter(p => !p.associated?.labeler)
.filter(
p =>
!p.viewer?.blockedBy && !p.viewer?.blocking && !p.associated?.labeler,
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(probably something like isBlockedOrMuted()?)

Copy link
Contributor Author

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 &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same q

@gaearon gaearon merged commit 6694a33 into main Jul 3, 2024
6 checks passed
@haileyok haileyok deleted the hailey/dont-follow-self branch September 2, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants