forked from mirrors/misskey
fix(backend): fix streaming note hiding logic (#17248)
* fix(backend): fix streaming note hiding logic * Update Changelog * refactor: avoid using generator function --------- Co-authored-by: Acid Chicken <root@acid-chicken.com>
This commit is contained in:
@@ -62,13 +62,14 @@ export class AntennaChannel extends Channel {
|
||||
@bindThis
|
||||
private async onEvent(data: GlobalEvents['antenna']['payload']) {
|
||||
if (data.type === 'note') {
|
||||
const note = await this.noteEntityService.pack(data.body.id, this.user, { detail: true });
|
||||
let note = await this.noteEntityService.pack(data.body.id, this.user, { detail: true });
|
||||
|
||||
if (!this.isNoteVisibleForMe(note)) return;
|
||||
if (this.isNoteMutedOrBlocked(note)) return;
|
||||
|
||||
const { shouldSkip } = await this.noteStreamingHidingService.processHiding(note, this.user?.id ?? null);
|
||||
if (shouldSkip) return;
|
||||
const filtered = await this.noteStreamingHidingService.filter(note, this.user?.id ?? null);
|
||||
if (!filtered) return;
|
||||
note = filtered;
|
||||
|
||||
if (this.user) {
|
||||
if (isRenotePacked(note) && !isQuotePacked(note)) {
|
||||
|
||||
Reference in New Issue
Block a user