1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 06:12:05 +01:00

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.
This commit is contained in:
Florian Schmaus 2018-09-06 18:42:41 +02:00
parent 830f3661e7
commit 45736e8ead
2 changed files with 2 additions and 3 deletions

View file

@ -35,7 +35,6 @@ public final class MessageTypeFilter extends FlexibleStanzaTypeFilter<Message> {
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);

View file

@ -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