Events with empty body aren't bridged
Bridging m.image or m.sticker events with body: "" fails.
To reproduce
- Craft and send an
m.imageevent withbody: "" - Notice that the image is not bridged to telegram
If I understand correctly, an empty body violates the spec. The bridge is right for dropping messages with an empty body.
The spec says the body key is required, but did not explicitly say it must be non-empty. In fact, some "required" fields in the spec are allowed to be empty strings.
It doesn't explicitly say so, but it pretty much implies it:
"The body key is text and MUST be used with every kind of msgtype as a fallback mechanism for when a client cannot render a message. This allows clients to display something even if it is just plain text."
There's nothing to display if body is empty, I therefore conclude that the field must not be empty.
This should probably be clarified in the spec to be more obvious.