1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-02 09:46:06 +02:00
This commit is contained in:
syuilo
2018-10-08 00:58:10 +09:00
parent 361ab00c61
commit 305915611e
2 changed files with 9 additions and 8 deletions

View File

@@ -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