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(
|
||||
profile:
|
||||
| AppBskyActorDefs.ProfileViewBasic
|
||||
| AppBskyActorDefs.ProfileViewDetailed,
|
||||
) {
|
||||
export function isBlockedOrBlocking(profile: atp.profile.AnyProfileView) {
|
||||
return profile.viewer?.blockedBy || profile.viewer?.blocking
|
||||
}
|
||||
|
||||
export function isMuted(
|
||||
profile:
|
||||
| AppBskyActorDefs.ProfileViewBasic
|
||||
| AppBskyActorDefs.ProfileViewDetailed,
|
||||
) {
|
||||
export function isMuted(profile: atp.profile.AnyProfileView) {
|
||||
return profile.viewer?.muted || profile.viewer?.mutedByList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user