handle silenced notes in Channel.isNoteMutedOrBlocked

This commit is contained in:
Hazelnoot 2025-06-03 17:32:42 -04:00
parent 333b117a2b
commit 324217d102
3 changed files with 9 additions and 11 deletions

View file

@ -97,6 +97,15 @@ export default abstract class Channel {
// If it's a boost (pure renote) then we need to check the target as well // 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; if (isPackedPureRenote(note) && note.renote && this.isNoteMutedOrBlocked(note.renote)) return true;
// Hide silenced notes
if (note.user.isSilenced || note.user.instance?.isSilenced) {
if (this.user == null) return true;
if (this.user.id === note.userId) return false;
if (this.following[note.userId] == null) return true;
}
// TODO muted threads
return false; return false;
} }

View file

@ -43,11 +43,6 @@ class AntennaChannel extends Channel {
if (this.isNoteMutedOrBlocked(note)) return; if (this.isNoteMutedOrBlocked(note)) return;
if (note.user.isSilenced || note.user.instance?.isSilenced) {
if (!this.user) return;
if (note.userId !== this.user.id && !this.following[note.userId]) return;
}
this.send('note', note); this.send('note', note);
} else { } else {
this.send(data.type, data.body); this.send(data.type, data.body);

View file

@ -60,12 +60,6 @@ class BubbleTimelineChannel extends Channel {
if (!this.utilityService.isBubbledHost(note.user.host)) return; if (!this.utilityService.isBubbledHost(note.user.host)) return;
if (isRenotePacked(note) && !isQuotePacked(note) && !this.withRenotes) return; if (isRenotePacked(note) && !isQuotePacked(note) && !this.withRenotes) return;
if (note.user.isSilenced) {
if (!this.user) return;
if (note.userId !== this.user.id && !this.following[note.userId]) return;
}
if (this.isNoteMutedOrBlocked(note)) return; if (this.isNoteMutedOrBlocked(note)) return;
const clonedNote = await this.assignMyReaction(note); const clonedNote = await this.assignMyReaction(note);