Created
July 15, 2016 03:28
-
-
Save protoss1010/073f771beecdd39d01d99ecbf7a95cd3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tw.com.fet.ecs.xmpp.level1.filter; | |
import org.jivesoftware.smack.filter.PacketFilter; | |
import org.jivesoftware.smack.packet.Message; | |
import org.jivesoftware.smack.packet.Packet; | |
public class EmmaDisplayedPacketFilter implements PacketFilter { | |
@Override | |
public boolean accept(Packet packet) { | |
if (!(packet instanceof Message)) { | |
return false; | |
} else { | |
Message message = (Message) packet; | |
// Have emmaDisplayed | |
return message.getEmmaDisplayeds().size() > 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment