diff --git a/packages/moxxmpp/lib/src/message.dart b/packages/moxxmpp/lib/src/message.dart index 43b3794..9c09cde 100644 --- a/packages/moxxmpp/lib/src/message.dart +++ b/packages/moxxmpp/lib/src/message.dart @@ -186,9 +186,11 @@ class MessageManager extends XmppManagerBase { body = details.messageRetraction!.fallback; } - stanza.addChild( - XMLNode(tag: 'body', text: body), - ); + if (body != null) { + stanza.addChild( + XMLNode(tag: 'body', text: body), + ); + } } if (details.requestDeliveryReceipt) {