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

Prevent recursive notifications #10

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

Conversation

Fishbowler
Copy link
Member

Fixes #1

Doesn't attempt to filter any packets that have originated from the server (have no Node in the JID)

No tests, as the code is on the Plugin class, and the effort to set this up for unit testing would be larger that the fix. Sorry :(

&& isNotServerGeneratedPacket(packet);
}

private boolean isNotServerGeneratedPacket(Packet packet) {
Copy link
Member

Choose a reason for hiding this comment

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

I have two separate issues with this approach:

  1. I do not think this strictly identifies 'server generated' stanzas. JIDs from remote domains also match this, as do JIDs from components.
  2. Is the problem fixed best by ignoring everything that originates from the server? Is there a use-case where we might want to filter that content? Maybe it's better to somehow flag notifications, and then always allow those flagged messages when they are sent to users that are expected to receive them.

@guusdk
Copy link
Member

guusdk commented Oct 26, 2022

Also: changelog. :)

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.

Content Filter filters a notification to admin with the original packet included
2 participants