From 4d026d8ae84819184a8cad93f65630fe6e2dca8c Mon Sep 17 00:00:00 2001 From: cmeng-git Date: Sun, 13 Feb 2022 15:58:37 +0800 Subject: [PATCH] [jingle] Add element and text to JingleReason's XML --- .../org/jivesoftware/smackx/jingle/element/JingleReason.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleReason.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleReason.java index 116c8375d..32a9e7d0f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleReason.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleReason.java @@ -35,6 +35,7 @@ public class JingleReason implements FullyQualifiedElement { public static final String ELEMENT = "reason"; public static final String NAMESPACE = Jingle.NAMESPACE; + public static final String TEXT_ELEMENT = "text"; public static AlternativeSession AlternativeSession(String sessionId) { return new AlternativeSession(sessionId); @@ -142,7 +143,7 @@ public class JingleReason implements FullyQualifiedElement { /** * An optional element that provides more detailed machine-readable information about the reason for the action. * - * @return an elemnet with machine-readable information about this reason or null. + * @return an element with machine-readable information about this reason or null. * @since 4.4.5 */ public ExtensionElement getElement() { @@ -155,6 +156,8 @@ public class JingleReason implements FullyQualifiedElement { xml.rightAngleBracket(); xml.emptyElement(reason); + xml.optElement(TEXT_ELEMENT, text); + xml.optAppend(element); xml.closeElement(this); return xml;