Add name to account model

Add the name of the account that's connected to the control link on the
web interface via an additional property on the ready payload for the
control link.
This commit is contained in:
Hornwitser committed 2021-03-18 23:05:47 +01:00
1 parent e1549c1b0c
commit 6458810571
6 files changed
+50 -5

No files matched your search

+1 -1
View File
@@ -401,7 +401,7 @@ class WebSocketClientConnector extends WebSocketBaseConnector {
}
this._startedReconnect = null;
this._connected = true;
this.emit("connect");
this.emit("connect", data);
} else if (type === "continue") {
logger.verbose("SOCKET | resuming existing session");
+7
View File
@@ -102,6 +102,13 @@ const serverHandshake = ajv.compile({
properties: {
"session_token": { type: "string" },
"heartbeat_interval": { type: "number" },
"account": {
additionalProperties: false,
required: ["name"],
properties: {
"name": { type: "string" },
},
},
},
},
},