diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-13 19:16:47 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-13 19:16:47 +0900 |
| commit | 3aef5e6748777b821e8bcb3ad58410ac52b848e2 (patch) | |
| tree | d0e1c57ecd8de78a774b1b51a5e5732b23f0fb8a /src/server/api/streaming.ts | |
| parent | connectedイベントはpongパラメータがtrueの時だけ発行するよ... (diff) | |
| download | sharkey-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.ts | 4 |
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'); } } |