From 1003fd393e7b8b1c0b686e4689e95d935bf4419b Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Mon, 8 Oct 2018 01:56:36 +0900
Subject: [PATCH] Fix bug

---
 src/server/api/stream/channels/main.ts | 6 +++---
 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);