From 45736e8eade74dc486c5b8f1ee56c4c072698ddc Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 6 Sep 2018 18:42:41 +0200 Subject: [PATCH] Remove NORMAL_OR_CHAT_OR_GROUPCHAT MessageTypeFilter Type 'groupchat' message stanzas are not like others, they usually require special handling. Hence such a filter is usually an indication that multiple concepts are intermixed. --- .../java/org/jivesoftware/smack/filter/MessageTypeFilter.java | 1 - .../jivesoftware/smackx/chat_markers/ChatMarkersManager.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 a73678dce..61d6ed276 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,7 +35,6 @@ 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_CHAT_OR_GROUPCHAT = new OrFilter(NORMAL_OR_CHAT, GROUPCHAT); public static final StanzaFilter NORMAL_OR_CHAT_OR_HEADLINE = new OrFilter(NORMAL_OR_CHAT, HEADLINE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java index 3910a8dbb..6f75e71ab 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java @@ -74,14 +74,14 @@ public final class ChatMarkersManager extends Manager { // @FORMATTER:OFF private static final StanzaFilter INCOMING_MESSAGE_FILTER = new AndFilter( - MessageTypeFilter.NORMAL_OR_CHAT_OR_GROUPCHAT, + MessageTypeFilter.NORMAL_OR_CHAT, new StanzaExtensionFilter(ChatMarkersElements.NAMESPACE), PossibleFromTypeFilter.ENTITY_BARE_JID, EligibleForChatMarker.INSTANCE ); private static final StanzaFilter OUTGOING_MESSAGE_FILTER = new AndFilter( - MessageTypeFilter.NORMAL_OR_CHAT_OR_GROUPCHAT, + MessageTypeFilter.NORMAL_OR_CHAT, MessageWithBodiesFilter.INSTANCE, new NotFilter(ChatMarkersFilter.INSTANCE), EligibleForChatMarker.INSTANCE