From 9f4eb0fd6d6f20784bb1ff36496c6f6ca3bae3a8 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sun, 7 Apr 2019 03:59:56 +0200 Subject: [PATCH] ImageMessage can have optional Thumbnail Information and info is also optional --- events.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/events.go b/events.go index 1a82803..311c129 100644 --- a/events.go +++ b/events.go @@ -73,12 +73,14 @@ type VideoMessage struct { Info VideoInfo `json:"info"` } -// ImageMessage is an m.image event +// ImageMessage is an m.image event - http://matrix.org/docs/spec/client_server/r0.2.0.html#m-image type ImageMessage struct { - MsgType string `json:"msgtype"` - Body string `json:"body"` - URL string `json:"url"` - Info ImageInfo `json:"info"` + MsgType string `json:"msgtype"` + Body string `json:"body"` + URL string `json:"url"` + Info ImageInfo `json:"info,omitempty"` + ThumbnailURL string `json:"thumbnail_url,omitempty"` + ThumbnailInfo ImageInfo `json:"thumbnail_info,omitempty"` } // An HTMLMessage is the contents of a Matrix HTML formated message event.