Skip to content

Example: JS pusher.trigger() returns a Promise and should be awaited#357

Open
RWebster-Noble wants to merge 1 commit intopusher:mainfrom
RWebster-Noble:js-await
Open

Example: JS pusher.trigger() returns a Promise and should be awaited#357
RWebster-Noble wants to merge 1 commit intopusher:mainfrom
RWebster-Noble:js-await

Conversation

@RWebster-Noble
Copy link
Copy Markdown

@RWebster-Noble RWebster-Noble commented Aug 23, 2025

Many javascript examples code blocks are missing await.

The server-side node.js pusher.trigger(...) and pusher.sendToUser(...) functions return a Promise and should be awaited.
This should be represented in the documentation.

If this call is not awaited then the calls can become unreliable.

Also fixed a minor inconsistency where some node.js code blocks were marked as 'js'

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 23, 2025

@RWebster-Noble is attempting to deploy a commit to the Pusher Team on Vercel.

A member of the Team first needs to authorize it.

@RWebster-Noble RWebster-Noble changed the title JS pusher.trigger() returns a Promise and should be awaited Example: JS pusher.trigger() returns a Promise and should be awaited Aug 23, 2025
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

Successfully merging this pull request may close these issues.

1 participant