summaryrefslogtreecommitdiff
path: root/src/server/api/stream
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/stream')
-rw-r--r--src/server/api/stream/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts
index 743d77b2a3..ef6397fcd9 100644
--- a/src/server/api/stream/index.ts
+++ b/src/server/api/stream/index.ts
@@ -24,6 +24,7 @@ export default class Connection {
public subscriber: Xev;
private channels: Channel[] = [];
private subscribingNotes: any = {};
+ public sendMessageToWsOverride: any = null; // 後方互換性のため
constructor(
wsConnection: websocket.connection,
@@ -164,6 +165,7 @@ export default class Connection {
*/
@autobind
public sendMessageToWs(type: string, payload: any) {
+ if (this.sendMessageToWsOverride) return this.sendMessageToWsOverride(type, payload); // 後方互換性のため
this.wsConnection.send(JSON.stringify({
type: type,
body: payload