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

add blacklist filter #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

MeitarR
Copy link

@MeitarR MeitarR commented Feb 21, 2023

Allows to filter out notifications by title using a list of regex

Comment on lines +31 to +39
Notification notification = sbn.getNotification();
String notificationTemplate = notification.extras.getString(Notification.EXTRA_TEMPLATE);
boolean isMessagingStyle = Notification.MessagingStyle.class.getName().equals(notificationTemplate);

if (!isMessagingStyle) {
// This is not a messaging-style notification, meaning that we can't determine if it's
// a group or a DM. Ignore it.
return true;
}
Copy link
Author

Choose a reason for hiding this comment

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

@SilverTuxedo maybe there should be a filter somewhere at the start that filters out all the non-messaging-style notifications?

this logic is duplicated

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.

1 participant