mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-08 22:21:08 +01:00
Add JivePropertiesExtension.from(Message)
This commit is contained in:
parent
e1cb837489
commit
6a5637c2e4
2 changed files with 12 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
import org.jivesoftware.smack.util.stringencoder.Base64;
|
||||
|
||||
|
|
@ -219,4 +220,14 @@ public class JivePropertiesExtension implements ExtensionElement {
|
|||
return xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a Jive properties extensions of the given message.
|
||||
*
|
||||
* @param message the message to return the extension from.
|
||||
* @return a Jive properties extension or null.
|
||||
* @since 4.2
|
||||
*/
|
||||
public static JivePropertiesExtension from(Message message) {
|
||||
return message.getExtension(ELEMENT, NAMESPACE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue