xmpp.js
xmpp.js copied to clipboard
Fix outgoing "filter" on middleware
trafficstars
hookOutgoing doesn't exist, but emit("send", element) does.
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.