From 9bebbf4e03f120c2ad8523566cb839e71a10b7c5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 10 Oct 2018 03:24:09 +0900 Subject: [PATCH] Add alias --- src/client/app/common/scripts/stream.ts | 2 +- src/server/api/stream/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/app/common/scripts/stream.ts b/src/client/app/common/scripts/stream.ts index 980330c4e..c588d1bb3 100644 --- a/src/client/app/common/scripts/stream.ts +++ b/src/client/app/common/scripts/stream.ts @@ -170,7 +170,7 @@ abstract class Connection extends EventEmitter { const type = payload === undefined ? typeOrPayload.type : typeOrPayload; const body = payload === undefined ? typeOrPayload.body : payload; - this.stream.send('channel', { + this.stream.send('ch', { id: this.id, type: type, body: body diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index ef6397fcd..1014343bb 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -58,6 +58,7 @@ export default class Connection { case 'connect': this.onChannelConnectRequested(body); break; case 'disconnect': this.onChannelDisconnectRequested(body); break; case 'channel': this.onChannelMessageRequested(body); break; + case 'ch': this.onChannelMessageRequested(body); break; // alias } }