fix: Only add a <body> element when specified

This commit is contained in:
PapaTutuWawa 2022-12-09 12:52:00 +01:00
parent cc1b371198
commit 88efdc361c

View File

@ -186,10 +186,12 @@ class MessageManager extends XmppManagerBase {
body = details.messageRetraction!.fallback;
}
if (body != null) {
stanza.addChild(
XMLNode(tag: 'body', text: body),
);
}
}
if (details.requestDeliveryReceipt) {
stanza.addChild(makeMessageDeliveryRequest());