From 759911797e945614d4907e0cc555013e165c33af Mon Sep 17 00:00:00 2001 From: Andreas Peters Date: Wed, 6 Sep 2017 15:45:25 +0200 Subject: [PATCH] add comments --- events.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/events.go b/events.go index 2e92db3..d8fb375 100644 --- a/events.go +++ b/events.go @@ -86,17 +86,19 @@ type HTMLMessage struct { Format string `json:"format"` FormattedBody string `json:"formatted_body"` } + // An FileMessage is the contents of a MATRIX File upload type FileMessage struct { - Body string `json:"body"` - MsgType string `json:"msgtype"` - URL string `json:"url"` + Body string `json:"body"` + MsgType string `json:"msgtype"` + URL string `json:"url"` Info FileInfo `json:"info"` } +// FileInfo contains information about a file type FileInfo struct { MimeType string `json:"mimetype"` - Size int64 `json:size"` + Size int64 `json:size"` } var htmlRegex = regexp.MustCompile("<[^<]+?>")