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

@@ -337,7 +337,6 @@ describe('ParseLiveQueryServer', function() {
query: query,
requestId: requestId,
sessionToken: 'sessionToken',
installationId: 'installationId',
};
parseLiveQueryServer._handleSubscribe(parseWebSocket, request);
@@ -360,7 +359,6 @@ describe('ParseLiveQueryServer', function() {
expect(args[0]).toBe(requestId);
expect(args[1].fields).toBe(query.fields);
expect(args[1].sessionToken).toBe(request.sessionToken);
expect(args[1].installationId).toBe(request.installationId);
// Make sure we send subscribe response to the client
expect(client.pushSubscribe).toHaveBeenCalledWith(requestId);
});
@@ -518,6 +516,7 @@ describe('ParseLiveQueryServer', function() {
const connectRequest = {
op: 'connect',
applicationId: '1',
installationId: '1234',
};
// Trigger message event
parseWebSocket.emit('message', connectRequest);