summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-21 07:45:49 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-21 07:45:49 +0900
commit225c89a5b81c3a02fc63b25c0f33f507561e5477 (patch)
treee104dbf12e642f78958bd5f944e2a4c6fdf1efa1
parentFix (diff)
downloadmisskey-225c89a5b81c3a02fc63b25c0f33f507561e5477.tar.gz
misskey-225c89a5b81c3a02fc63b25c0f33f507561e5477.tar.bz2
misskey-225c89a5b81c3a02fc63b25c0f33f507561e5477.zip
[API] Fix bug
-rw-r--r--src/api/streaming.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/streaming.ts b/src/api/streaming.ts
index 8348d7c38f..17db59fd0a 100644
--- a/src/api/streaming.ts
+++ b/src/api/streaming.ts
@@ -51,6 +51,10 @@ module.exports = (server: http.Server) => {
};
function authenticate(connection: websocket.connection, token: string): Promise<any> {
+ if (token == null) {
+ return Promise.resolve(null);
+ }
+
return new Promise(async (resolve, reject) => {
if (isNativeToken(token)) {
// Fetch user