mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-24 01:33:07 +02:00
Fix bug
This commit is contained in:
parent
2ede3c0864
commit
1003fd393e
2 changed files with 4 additions and 4 deletions
|
@ -14,12 +14,12 @@ export default class extends Channel {
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'notification': {
|
case 'notification': {
|
||||||
if (!mutedUserIds.includes(body.userId)) {
|
if (mutedUserIds.includes(body.userId)) return;
|
||||||
this.send('notification', body);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.send(type, body);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Publisher {
|
||||||
|
|
||||||
private publish = (channel: string, type: string, value?: any): void => {
|
private publish = (channel: string, type: string, value?: any): void => {
|
||||||
const message = type == null ? value : value == null ?
|
const message = type == null ? value : value == null ?
|
||||||
{ type: type } :
|
{ type: type, body: null } :
|
||||||
{ type: type, body: value };
|
{ type: type, body: value };
|
||||||
|
|
||||||
this.ev.emit(channel, message);
|
this.ev.emit(channel, message);
|
||||||
|
|
Loading…
Reference in a new issue