This commit is contained in:
syuilo 2018-10-08 01:56:36 +09:00
parent 2ede3c0864
commit 1003fd393e
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 4 additions and 4 deletions

View File

@ -14,12 +14,12 @@ export default class extends Channel {
switch (type) {
case 'notification': {
if (!mutedUserIds.includes(body.userId)) {
this.send('notification', body);
}
if (mutedUserIds.includes(body.userId)) return;
break;
}
}
this.send(type, body);
});
}
}

View File

@ -25,7 +25,7 @@ class Publisher {
private publish = (channel: string, type: string, value?: any): void => {
const message = type == null ? value : value == null ?
{ type: type } :
{ type: type, body: null } :
{ type: type, body: value };
this.ev.emit(channel, message);