diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-08 01:56:36 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-08 01:56:36 +0900 |
| commit | 1003fd393e7b8b1c0b686e4689e95d935bf4419b (patch) | |
| tree | 3734b5e1957dec269ce8e2c72ffc65ec7f18d6a9 /src | |
| parent | Clean up (diff) | |
| download | sharkey-1003fd393e7b8b1c0b686e4689e95d935bf4419b.tar.gz sharkey-1003fd393e7b8b1c0b686e4689e95d935bf4419b.tar.bz2 sharkey-1003fd393e7b8b1c0b686e4689e95d935bf4419b.zip | |
Fix bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/api/stream/channels/main.ts | 6 | ||||
| -rw-r--r-- | src/stream.ts | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/stream/channels/main.ts b/src/server/api/stream/channels/main.ts index a6c5b12760..fd0984c833 100644 --- a/src/server/api/stream/channels/main.ts +++ b/src/server/api/stream/channels/main.ts @@ -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); }); } } diff --git a/src/stream.ts b/src/stream.ts index 4cd8fc8b2c..45b353d904 100644 --- a/src/stream.ts +++ b/src/stream.ts @@ -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); |