From db273318b895820a8b418acba55b985cb16812ed Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 5 May 2023 16:58:42 +0900 Subject: [PATCH] Remove the code snippets which didn't work --- packages/backend/src/server/api/stream/channels/antenna.ts | 7 ------- packages/backend/src/server/api/stream/channels/channel.ts | 7 ------- .../backend/src/server/api/stream/channels/user-list.ts | 7 ------- 3 files changed, 21 deletions(-) diff --git a/packages/backend/src/server/api/stream/channels/antenna.ts b/packages/backend/src/server/api/stream/channels/antenna.ts index e110c852b7..050a8d1019 100644 --- a/packages/backend/src/server/api/stream/channels/antenna.ts +++ b/packages/backend/src/server/api/stream/channels/antenna.ts @@ -1,7 +1,6 @@ import Channel from "../channel.js"; import { Notes } from "@/models/index.js"; import { isUserRelated } from "@/misc/is-user-related.js"; -import { getWordHardMute } from "@/misc/check-word-mute.js"; import type { StreamMessages } from "../types.js"; import { IdentifiableError } from "@/misc/identifiable-error.js"; @@ -38,12 +37,6 @@ export default class extends Channel { if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) return; - if ( - this.userProfile && - (await getWordHardMute(note, this.user, this.userProfile.mutedWords)) - ) - return; - this.connection.cacheNote(note); this.send("note", note); diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts index a9608c2948..dc291c5153 100644 --- a/packages/backend/src/server/api/stream/channels/channel.ts +++ b/packages/backend/src/server/api/stream/channels/channel.ts @@ -1,7 +1,6 @@ import Channel from "../channel.js"; import { Users } from "@/models/index.js"; import { isUserRelated } from "@/misc/is-user-related.js"; -import { getWordHardMute } from "@/misc/check-word-mute.js"; import type { User } from "@/models/entities/user.js"; import type { StreamMessages } from "../types.js"; import type { Packed } from "@/misc/schema.js"; @@ -40,12 +39,6 @@ export default class extends Channel { if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) return; - if ( - this.userProfile && - (await getWordHardMute(note, this.user, this.userProfile.mutedWords)) - ) - return; - this.connection.cacheNote(note); this.send("note", note); diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts index c9b658c5c7..105c45955c 100644 --- a/packages/backend/src/server/api/stream/channels/user-list.ts +++ b/packages/backend/src/server/api/stream/channels/user-list.ts @@ -2,7 +2,6 @@ import Channel from "../channel.js"; import { UserListJoinings, UserLists } from "@/models/index.js"; import type { User } from "@/models/entities/user.js"; import { isUserRelated } from "@/misc/is-user-related.js"; -import { getWordHardMute } from "@/misc/check-word-mute.js"; import type { Packed } from "@/misc/schema.js"; export default class extends Channel { @@ -60,12 +59,6 @@ export default class extends Channel { if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) return; - if ( - this.userProfile && - (await getWordHardMute(note, this.user, this.userProfile.mutedWords)) - ) - return; - this.send("note", note); }