Fix installationId on LiveQuery connect (#6180)

Throws an error and prevents LiveQuery from reconnecting.

Fixes Monitoring installationId.
Allow installationId to be sent to and from client.
This commit is contained in:
Diamond Lewis
2019-11-04 15:53:13 -06:00
committed by GitHub
parent 4a5fed83bd
commit 2533db0ad3
4 changed files with 13 additions and 9 deletions

View File

@@ -16,6 +16,7 @@ class Client {
parseWebSocket: any;
hasMasterKey: boolean;
sessionToken: string;
installationId: string;
userId: string;
roles: Array<string>;
subscriptionInfos: Object;
@@ -32,12 +33,14 @@ class Client {
id: number,
parseWebSocket: any,
hasMasterKey: boolean = false,
sessionToken: string
sessionToken: string,
installationId: string
) {
this.id = id;
this.parseWebSocket = parseWebSocket;
this.hasMasterKey = hasMasterKey;
this.sessionToken = sessionToken;
this.installationId = installationId;
this.roles = [];
this.subscriptionInfos = new Map();
this.pushConnect = this._pushEvent('connected');
@@ -93,6 +96,7 @@ class Client {
const response: Message = {
op: type,
clientId: this.id,
installationId: this.installationId,
};
if (typeof subscriptionId !== 'undefined') {
response['requestId'] = subscriptionId;