summaryrefslogtreecommitdiff
path: root/src/server/api/streaming.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-13 19:16:47 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-13 19:16:47 +0900
commit3aef5e6748777b821e8bcb3ad58410ac52b848e2 (patch)
treed0e1c57ecd8de78a774b1b51a5e5732b23f0fb8a /src/server/api/streaming.ts
parentconnectedイベントはpongパラメータがtrueの時だけ発行するよ... (diff)
downloadsharkey-3aef5e6748777b821e8bcb3ad58410ac52b848e2.tar.gz
sharkey-3aef5e6748777b821e8bcb3ad58410ac52b848e2.tar.bz2
sharkey-3aef5e6748777b821e8bcb3ad58410ac52b848e2.zip
Better id
Diffstat (limited to 'src/server/api/streaming.ts')
-rw-r--r--src/server/api/streaming.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts
index 1a0543b364..8c0e6f6372 100644
--- a/src/server/api/streaming.ts
+++ b/src/server/api/streaming.ts
@@ -64,14 +64,14 @@ module.exports = (server: http.Server) => {
}));
};
- main.connectChannel(Math.random().toString(), null,
+ main.connectChannel(Math.random().toString().substr(2, 8), null,
request.resourceURL.pathname === '/' ? 'homeTimeline' :
request.resourceURL.pathname === '/local-timeline' ? 'localTimeline' :
request.resourceURL.pathname === '/hybrid-timeline' ? 'hybridTimeline' :
request.resourceURL.pathname === '/global-timeline' ? 'globalTimeline' : null);
if (request.resourceURL.pathname === '/') {
- main.connectChannel(Math.random().toString(), null, 'main');
+ main.connectChannel(Math.random().toString().substr(2, 8), null, 'main');
}
}