Any profile type will work in blocked-and-muted
This commit is contained in:
@@ -1,17 +1,9 @@
|
|||||||
import {AppBskyActorDefs} from '@atproto/api'
|
import * as atp from '#/types/atproto'
|
||||||
|
|
||||||
export function isBlockedOrBlocking(
|
export function isBlockedOrBlocking(profile: atp.profile.AnyProfileView) {
|
||||||
profile:
|
|
||||||
| AppBskyActorDefs.ProfileViewBasic
|
|
||||||
| AppBskyActorDefs.ProfileViewDetailed,
|
|
||||||
) {
|
|
||||||
return profile.viewer?.blockedBy || profile.viewer?.blocking
|
return profile.viewer?.blockedBy || profile.viewer?.blocking
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isMuted(
|
export function isMuted(profile: atp.profile.AnyProfileView) {
|
||||||
profile:
|
|
||||||
| AppBskyActorDefs.ProfileViewBasic
|
|
||||||
| AppBskyActorDefs.ProfileViewDetailed,
|
|
||||||
) {
|
|
||||||
return profile.viewer?.muted || profile.viewer?.mutedByList
|
return profile.viewer?.muted || profile.viewer?.mutedByList
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user