diff --git a/src/state/queries/notifications/util.ts b/src/state/queries/notifications/util.ts index 06b639ee22..e4ec246505 100644 --- a/src/state/queries/notifications/util.ts +++ b/src/state/queries/notifications/util.ts @@ -1,14 +1,13 @@ import { AppBskyNotificationListNotifications, ModerationOpts, - moderateProfile, + moderateNotification, AppBskyFeedDefs, AppBskyFeedPost, AppBskyFeedRepost, AppBskyFeedLike, AppBskyEmbedRecord, } from '@atproto/api' -import {moderatePost_wrapped as moderatePost} from '#/lib/moderatePost_wrapped' import chunk from 'lodash.chunk' import {QueryClient} from '@tanstack/react-query' import {getAgent} from '../../session' @@ -88,7 +87,6 @@ export async function fetchPage({ // internal methods // = -// TODO this should be in the sdk as moderateNotification -prf function shouldFilterNotif( notif: AppBskyNotificationListNotifications.Notification, moderationOpts: ModerationOpts | undefined, @@ -96,22 +94,7 @@ function shouldFilterNotif( if (!moderationOpts) { return false } - const profile = moderateProfile(notif.author, moderationOpts) - if (profile.ui('profileList').filter || notif.author.viewer?.muted) { - return true - } - if ( - notif.type === 'reply' || - notif.type === 'quote' || - notif.type === 'mention' - ) { - // NOTE: the notification overlaps the post enough for this to work - const post = moderatePost(notif, moderationOpts) - if (post.ui('contentList').filter) { - return true - } - } - return false + return moderateNotification(notif, moderationOpts).ui('contentList').filter } function groupNotifications( diff --git a/src/view/screens/DebugMod.tsx b/src/view/screens/DebugMod.tsx index 53e39c4e50..48683cc561 100644 --- a/src/view/screens/DebugMod.tsx +++ b/src/view/screens/DebugMod.tsx @@ -187,8 +187,6 @@ export const DebugModScreen = ({}: NativeStackScreenProps< return moderatePost(post, modOpts) }, [post, modOpts]) - console.log(post) - return (