From 577c59484b14726e553eb31d745b9fe27616cedd Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Tue, 12 May 2020 19:57:56 +0200 Subject: [PATCH] pep: notification type can be normal or headline --- .../java/org/jivesoftware/smack/filter/MessageTypeFilter.java | 1 + .../src/main/java/org/jivesoftware/smackx/pep/PepManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/filter/MessageTypeFilter.java b/smack-core/src/main/java/org/jivesoftware/smack/filter/MessageTypeFilter.java index 61d6ed276..6d70dbae3 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/filter/MessageTypeFilter.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/filter/MessageTypeFilter.java @@ -35,6 +35,7 @@ public final class MessageTypeFilter extends FlexibleStanzaTypeFilter { public static final StanzaFilter HEADLINE = new MessageTypeFilter(Type.headline); public static final StanzaFilter ERROR = new MessageTypeFilter(Type.error); public static final StanzaFilter NORMAL_OR_CHAT = new OrFilter(NORMAL, CHAT); + public static final StanzaFilter NORMAL_OR_HEADLINE = new OrFilter(NORMAL, HEADLINE); public static final StanzaFilter NORMAL_OR_CHAT_OR_HEADLINE = new OrFilter(NORMAL_OR_CHAT, HEADLINE); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java index 0ec19bf8a..20b009287 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java @@ -95,7 +95,7 @@ public final class PepManager extends Manager { // TODO: Ideally PepManager would re-use PubSubManager for this. But the functionality in PubSubManager does not yet // exist. private static final StanzaFilter PEP_EVENTS_FILTER = new AndFilter( - MessageTypeFilter.HEADLINE, + MessageTypeFilter.NORMAL_OR_HEADLINE, FromJidTypeFilter.ENTITY_BARE_JID, EventItemsExtensionFilter.INSTANCE);