Skip to content

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

Open
RWebster-Noble wants to merge 1 commit into
pusher: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 into
pusher:mainfrom
RWebster-Noble:js-await

Conversation

@RWebster-Noble

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

Copy link
Copy Markdown

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

vercel Bot commented Aug 23, 2025

Copy link
Copy Markdown

@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