Open singpolyma opened 10 months ago
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.
hookOutgoing doesn't exist, but emit("send", element) does.