diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-01-21 07:45:49 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-01-21 07:45:49 +0900 |
| commit | 225c89a5b81c3a02fc63b25c0f33f507561e5477 (patch) | |
| tree | e104dbf12e642f78958bd5f944e2a4c6fdf1efa1 | |
| parent | Fix (diff) | |
| download | misskey-225c89a5b81c3a02fc63b25c0f33f507561e5477.tar.gz misskey-225c89a5b81c3a02fc63b25c0f33f507561e5477.tar.bz2 misskey-225c89a5b81c3a02fc63b25c0f33f507561e5477.zip | |
[API] Fix bug
| -rw-r--r-- | src/api/streaming.ts | 4 |
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 |