xmpp.js icon indicating copy to clipboard operation
xmpp.js copied to clipboard

Fix outgoing "filter" on middleware

Open singpolyma opened this issue 2 years ago • 1 comments
trafficstars

hookOutgoing doesn't exist, but emit("send", element) does.

singpolyma avatar Nov 14 '23 21:11 singpolyma

middleware.filter is meant to (as I see in documentation) run on all outgoing stanzas in the same way as middleware.use runs on all incoming stanzas. However, without this patch it never runs at all because there is nothing that calls entity.hookOutgoing so this patch changes it to use the send event which actually does occur in the desired case.

singpolyma avatar Nov 28 '23 17:11 singpolyma