You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In following code I expect to get list of users who are subscribed to channelName. Variable channelName has name of our presence channel const usersList = await pusher.get({ path: /channels/${channelName}/users });
Instead of pusher getting list of all users who are currently subscribed to this channel, I get an unresolved promise.
I event tried using .then instead of await so consider following code: pusher.get({ path:/channels/${channelName}/users}) .then(async (data) => { console.log(await data.json()); }) .catch((error) => { console.log(error); });
As you can see in above code, even though I use .then to resolve promise, I still have to await data.json() inside .then() clause
If the current behavior is a bug, please provide the steps to reproduce and
if possible a minimal demo of the problem via https://jsfiddle.net or similar.
install pusher library on node server
import Pusher class and create Pusher class instance
authorize/authenticate users to pusher channel
then in separate nodejs endpoint, run following code await pusher.get({ path: /channels/${channelName}/users })
This will return a non-resolved promise
What is the expected behavior?
Expected behavior would be I get an array of list of users. So data should be returned after promise is resolved
Which versions of Pusher, and which browsers / OS are affected by this issue?
Did this work in previous versions of Pusher? If so, which?
We have node version v16.18.0 and pusher version 8.19.2
I haven't tried this in older version of pusher packages
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
What is the current behavior?
const usersList = await pusher.get({ path:
/channels/${channelName}/users});
pusher.get({ path:
/channels/${channelName}/users}) .then(async (data) => { console.log(await data.json()); }) .catch((error) => { console.log(error); });
If the current behavior is a bug, please provide the steps to reproduce and
if possible a minimal demo of the problem via https://jsfiddle.net or similar.
pusher
library on node serverawait pusher.get({ path:
/channels/${channelName}/users})
This will return a non-resolved promise
What is the expected behavior?
Expected behavior would be I get an array of list of users. So data should be returned after promise is resolved
Which versions of Pusher, and which browsers / OS are affected by this issue?
Did this work in previous versions of Pusher? If so, which?
The text was updated successfully, but these errors were encountered: