Use Message.hasStanzaIdSet() in EligibleForChatMarker filter

This commit is contained in:
Florian Schmaus 2018-09-06 18:52:55 +02:00
parent 0b9cce507d
commit 3f1b18636e
1 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ package org.jivesoftware.smackx.chat_markers.filter;
import org.jivesoftware.smack.filter.StanzaExtensionFilter; import org.jivesoftware.smack.filter.StanzaExtensionFilter;
import org.jivesoftware.smack.packet.ExtensionElement; import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.chatstates.ChatState; import org.jivesoftware.smackx.chatstates.ChatState;
import org.jivesoftware.smackx.chatstates.ChatStateManager; import org.jivesoftware.smackx.chatstates.ChatStateManager;
@ -51,7 +50,7 @@ public final class EligibleForChatMarker extends StanzaExtensionFilter {
*/ */
@Override @Override
public boolean accept(Stanza message) { public boolean accept(Stanza message) {
if (StringUtils.isNullOrEmpty(message.getStanzaId())) { if (!message.hasStanzaIdSet()) {
return false; return false;
} }