Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Server Cloud onLiveQueryEvent #6314

Closed
memishood opened this issue Jan 4, 2020 · 1 comment
Closed

Parse Server Cloud onLiveQueryEvent #6314

memishood opened this issue Jan 4, 2020 · 1 comment

Comments

@memishood
Copy link

memishood commented Jan 4, 2020

Hi, i have questions about the title.

1-) does onLiveQueryEvent trigger support async / await ?

2-) could we get parse user or objectId from onLiveQueryEvent if logged in (authenticated) ?

Parse.Cloud.onLiveQueryEvent( ({event, client, sessionToken, useMasterKey, installationId, clients, subscriptions, error}) => {
    if (event === 'ws_disconnect') {
        //i want know who is disconnected as parse user
    }
});

server: 3.9.0

@dplewis
Copy link
Member

dplewis commented Jan 4, 2020

  1. I believe so, but I don't think it can resolve a promise (returns a promise). You can try it in your code and let us know if it works. Here is the code for runLiveQueryEvents.

  2. If you have the sessionToken or installationId you can query for that user in the _Session or _installation classes.

@dplewis dplewis closed this as completed Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants