Don't follow self, blocks or mute when following all; don't show blocks in list (#4715)
* don't follow self when following all * also filter blocks * add more filtering to follow all * extract logic to functions
This commit is contained in:
parent
dc3c81c4e2
commit
6694a33603
3 changed files with 27 additions and 2 deletions
17
src/lib/moderation/blocked-and-muted.ts
Normal file
17
src/lib/moderation/blocked-and-muted.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import {AppBskyActorDefs} from '@atproto/api'
|
||||
|
||||
export function isBlockedOrBlocking(
|
||||
profile:
|
||||
| AppBskyActorDefs.ProfileViewBasic
|
||||
| AppBskyActorDefs.ProfileViewDetailed,
|
||||
) {
|
||||
return profile.viewer?.blockedBy || profile.viewer?.blocking
|
||||
}
|
||||
|
||||
export function isMuted(
|
||||
profile:
|
||||
| AppBskyActorDefs.ProfileViewBasic
|
||||
| AppBskyActorDefs.ProfileViewDetailed,
|
||||
) {
|
||||
return profile.viewer?.muted || profile.viewer?.mutedByList
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue