mirror of
https://git.boykissers.com/pawkey/pawkey-sk.git
synced 2025-12-20 12:14:18 +00:00
handle silenced notes in Channel.isNoteMutedOrBlocked
This commit is contained in:
@@ -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 (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;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,11 +43,6 @@ class AntennaChannel extends Channel {
|
||||
|
||||
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);
|
||||
} else {
|
||||
this.send(data.type, data.body);
|
||||
|
||||
@@ -60,12 +60,6 @@ class BubbleTimelineChannel extends Channel {
|
||||
if (!this.utilityService.isBubbledHost(note.user.host)) 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;
|
||||
|
||||
const clonedNote = await this.assignMyReaction(note);
|
||||
|
||||
Reference in New Issue
Block a user