mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-04-28 09:36:56 +00:00
check mutes and blocks of renote target in streaming API
This commit is contained in:
parent
cba9fcd4f2
commit
de3c9124cd
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
|||
import { bindThis } from '@/decorators.js';
|
||||
import { isInstanceMuted } from '@/misc/is-instance-muted.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js';
|
||||
import { isRenotePacked, isQuotePacked, isPackedPureRenote } from '@/misc/is-renote.js';
|
||||
import type { Packed } from '@/misc/json-schema.js';
|
||||
import type { JsonObject, JsonValue } from '@/misc/json-value.js';
|
||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||
|
@ -75,6 +75,9 @@ export default abstract class Channel {
|
|||
// 流れてきたNoteがリノートをミュートしてるユーザが行ったもの
|
||||
if (isRenotePacked(note) && !isQuotePacked(note) && this.userIdsWhoMeMutingRenotes.has(note.user.id)) return true;
|
||||
|
||||
// If it's a boost (pure renote) then we need to check the target as well
|
||||
if (isPackedPureRenote(note) && note.renote && this.isNoteMutedOrBlocked(note.renote)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue