1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-14 06:51:08 +01:00

[jingle] Add empty element optimization for <content/>

This commit is contained in:
Florian Schmaus 2021-10-19 11:16:35 +02:00
parent ec456399b5
commit 585bcb4dc8
2 changed files with 6 additions and 2 deletions

View file

@ -145,6 +145,11 @@ public final class JingleContent implements FullyQualifiedElement {
xml.optAttribute(DISPOSITION_ATTRIBUTE_NAME, disposition);
xml.attribute(NAME_ATTRIBUTE_NAME, name);
xml.optAttribute(SENDERS_ATTRIBUTE_NAME, senders);
if (description == null && transport == null) {
return xml.closeEmptyElement();
}
xml.rightAngleBracket();
xml.optAppend(description);