Skip to content

feat: add promise support to connection handlers - #885

Open
Bricklou wants to merge 1 commit into
strophe:masterfrom
Bricklou:master
Open

Bricklou wants to merge 1 commit into
strophe:masterfrom
Bricklou:master

Conversation

@Bricklou

@Bricklou Bricklou commented Sep 9, 2026

Copy link
Copy Markdown

This pull request should allow to use promises inside the connection handler:

const conn = new Strophe.Connection('http://fake');
// ...
conn.addHandler(async (stanza) => {
    /* do async stuff */
   await myservice.doStuff()
}, null, "message", "management")

Closes #884

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.

Add support for async callback in Connection#addHandler

1 participant