Java Code Examples for org.jivesoftware.smack.packet.Stanza#hasExtension()

The following examples show how to use org.jivesoftware.smack.packet.Stanza#hasExtension() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StanzaExtensionFilter.java    From Smack with Apache License 2.0 4 votes vote down vote up
@Override
public boolean accept(Stanza packet) {
    return packet.hasExtension(elementName, namespace);
}
 
Example 2
Source File: OmemoManager.java    From Smack with Apache License 2.0 2 votes vote down vote up
/**
 * Return true, if the given Stanza contains an OMEMO element 'encrypted'.
 *
 * @param stanza stanza
 * @return true if stanza has extension 'encrypted'
 */
static boolean stanzaContainsOmemoElement(Stanza stanza) {
    return stanza.hasExtension(OmemoElement.NAME_ENCRYPTED, OMEMO_NAMESPACE_V_AXOLOTL);
}