Include a "body" of the fictitious filename with images

Some clients (like Cinny.in) expect there to be a content.body element present
in m.image messages, and will complain "Malformed event" if this value is empty.
This commit is contained in:
Bryce Chidester 2022-08-12 11:14:49 -07:00
parent 877abf1331
commit 6bf07b2598

View File

@ -268,7 +268,7 @@ func SendImage(c *gomatrix.Client, roomID string, img *image.RGBA) error {
return err
}
_, err = c.SendImage(roomID, "", mediaURL.ContentURI)
_, err = c.SendImage(roomID, "embedded_image.png", mediaURL.ContentURI)
if err != nil {
return err
}