MUC messages with OOB data but without body are discarded
I use Matterbridge to link multiple chat rooms from different chat networks (messengers) together.
Some messengers have comments for file uploads, or can send message body and file in the same message.
Conversations XMPP client can show only either text or inline image in the message, that's why I can't send both message body and OOB data in a single message.
To workaround this issue, Matterbridge sends 2 XMPP messages when a message with image is sent: one with message body and a link to an image, and another is jabber:x:oob data without <body> tag.
This way XMPP clients without OOB support does not show second (blank) message, and clients with OOB support (Conversations, Psi+) show both message body and inline image.
Gajim ignores MUC messages with jabber:x:oob, but without <body> tag, so in my case it acts as a client without OOB support. It does not show inline image, it only shows first message with message body and link.
The code which discards messages without body: https://dev.gajim.org/gajim/gajim/blob/master/gajim/common/connection_handlers_events.py#L1222
Introduced in commit 81566df8
Note that I can't send both body and OOB data in a single message, because inline message won't be shown in Conversations, and I can't include empty body tag because some clients would handle that as a blank message.
Versions
- OS: Linux
- Gajim version: 1.0.3
- GTK version: 3.22.30
- Python-nbxmpp version: 0.6.6
Steps to reproduce the problem
- Join MUC
- Send MUC message with a link to an image inside OOB data and without body tag
Expected behavior
Inline image from OOB data is shown
Actual behavior
Inline image from OOB data is not shown