From 6bf07b2598277ca82513a8f9115146baaa00645c Mon Sep 17 00:00:00 2001 From: Bryce Chidester Date: Fri, 12 Aug 2022 11:14:49 -0700 Subject: [PATCH] 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. --- plugins/plugins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/plugins.go b/plugins/plugins.go index db32b09..6c175fc 100644 --- a/plugins/plugins.go +++ b/plugins/plugins.go @@ -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 }