diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java index 8053b3494..cdf8e79b1 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java @@ -25,8 +25,8 @@ import org.jivesoftware.smack.StanzaListener; import org.jivesoftware.smack.SmackException.NoResponseException; import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; +import org.jivesoftware.smack.filter.FlexibleStanzaTypeFilter; import org.jivesoftware.smack.filter.OrFilter; -import org.jivesoftware.smack.filter.StanzaFilter; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.ExtensionElement; @@ -697,7 +697,7 @@ abstract public class Node * * @author Robin Collier */ - class EventContentFilter implements StanzaFilter + class EventContentFilter extends FlexibleStanzaTypeFilter { private String firstElement; private String secondElement; @@ -713,12 +713,8 @@ abstract public class Node secondElement = secondLevelElement; } - public boolean accept(Stanza packet) - { - if (!(packet instanceof Message)) - return false; - - EventElement event = (EventElement)packet.getExtension("event", PubSubNamespace.EVENT.getXmlns()); + public boolean acceptSpecific(Message message) { + EventElement event = EventElement.from(message); if (event == null) return false;