Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outgoing "filter" on middleware #1004

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

singpolyma
Copy link

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

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

@sonnyp sonnyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PRs

Can you clarify and explain a bit better this please?

@singpolyma
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants