copy changes to main channel

This commit is contained in:
Hazelnoot 2025-06-03 17:33:12 -04:00
parent 324217d102
commit ebee663410

View file

@ -32,10 +32,12 @@ class MainChannel extends Channel {
switch (data.type) { switch (data.type) {
case 'notification': { case 'notification': {
// Ignore notifications from instances the user has muted // Ignore notifications from instances the user has muted
if (isUserFromMutedInstance(data.body, new Set<string>(this.userProfile?.mutedInstances ?? []))) return; if (isUserFromMutedInstance(data.body, this.userMutedInstances)) return;
if (data.body.userId && this.userIdsWhoMeMuting.has(data.body.userId)) return; if (data.body.userId && this.userIdsWhoMeMuting.has(data.body.userId)) return;
if (data.body.note && data.body.note.isHidden) { if (data.body.note && data.body.note.isHidden) {
if (this.isNoteMutedOrBlocked(data.body.note)) return;
if (!this.isNoteVisibleToMe(data.body.id)) return;
const note = await this.noteEntityService.pack(data.body.note.id, this.user, { const note = await this.noteEntityService.pack(data.body.note.id, this.user, {
detail: true, detail: true,
}); });
@ -44,9 +46,7 @@ class MainChannel extends Channel {
break; break;
} }
case 'mention': { case 'mention': {
if (isInstanceMuted(data.body, new Set<string>(this.userProfile?.mutedInstances ?? []))) return; if (this.isNoteMutedOrBlocked(data.body)) return;
if (this.userIdsWhoMeMuting.has(data.body.userId)) return;
if (data.body.isHidden) { if (data.body.isHidden) {
const note = await this.noteEntityService.pack(data.body.id, this.user, { const note = await this.noteEntityService.pack(data.body.id, this.user, {
detail: true, detail: true,