mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-13 07:24:33 +00:00
copy changes to main channel
This commit is contained in:
parent
324217d102
commit
ebee663410
1 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue