diff options
| author | anatawa12 <anatawa12@icloud.com> | 2024-04-17 14:23:41 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-17 14:23:41 +0900 |
| commit | e423b8ce4b28ecbe4e300fc67389e4def3761eb6 (patch) | |
| tree | 43d5e15ead542d1f0dad7dc30e0f86dc7e192535 /packages/backend/src/server/api/stream/channels/local-timeline.ts | |
| parent | enhance(frontend): フォローするかどうかの確認ダイアログを... (diff) | |
| download | misskey-e423b8ce4b28ecbe4e300fc67389e4def3761eb6.tar.gz misskey-e423b8ce4b28ecbe4e300fc67389e4def3761eb6.tar.bz2 misskey-e423b8ce4b28ecbe4e300fc67389e4def3761eb6.zip | |
細かいミュートの処理の修正 (#13695)
* fix: some replies are removed from global timeline
* refactor: 各チャンネルのミュートとブロックの処理をまとめる
* fix: リノートをミュートでその人のノートのリノートをミュートしていたを修正
* refactor: isPureRenotePackedを他のところでも使う
* docs(changelog): CHANGELOGを更新
* test: withReplies = falseでフォローしてる人によるリプライが流れてくる
* test: ノートミュートしているユーザーの通常ノートのリノートが流れてくる/含まれる
Diffstat (limited to 'packages/backend/src/server/api/stream/channels/local-timeline.ts')
| -rw-r--r-- | packages/backend/src/server/api/stream/channels/local-timeline.ts | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts index 43d26124ef..442d08ae51 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -4,13 +4,12 @@ */ import { Injectable } from '@nestjs/common'; -import { checkWordMute } from '@/misc/check-word-mute.js'; -import { isUserRelated } from '@/misc/is-user-related.js'; import type { Packed } from '@/misc/json-schema.js'; import { MetaService } from '@/core/MetaService.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { bindThis } from '@/decorators.js'; import { RoleService } from '@/core/RoleService.js'; +import { isQuotePacked, isRenotePacked } from '@/misc/is-renote.js'; import Channel, { type MiChannelService } from '../channel.js'; class LocalTimelineChannel extends Channel { @@ -61,16 +60,11 @@ class LocalTimelineChannel extends Channel { if (reply.userId !== this.user.id && note.userId !== this.user.id && reply.userId !== note.userId) return; } - if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return; + if (isRenotePacked(note) && !isQuotePacked(note) && !this.withRenotes) return; - // 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する - if (isUserRelated(note, this.userIdsWhoMeMuting)) return; - // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する - if (isUserRelated(note, this.userIdsWhoBlockingMe)) return; + if (this.isNoteMutedOrBlocked(note)) return; - if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return; - - if (this.user && note.renoteId && !note.text) { + if (this.user && isRenotePacked(note) && !isQuotePacked(note)) { if (note.renote && Object.keys(note.renote.reactions).length > 0) { const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id); note.renote.myReaction = myRenoteReaction; |