mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
handle silenced notes in Channel.isNoteMutedOrBlocked
This commit is contained in:
parent
333b117a2b
commit
324217d102
3 changed files with 9 additions and 11 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue