6694a33603
* don't follow self when following all * also filter blocks * add more filtering to follow all * extract logic to functions
18 lines
437 B
TypeScript
18 lines
437 B
TypeScript
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
|
|
}
|