matrix-org / gomatrix

A Golang Matrix client
Apache License 2.0
285 stars 53 forks source link

extended ImageMessage for Thumbnail and added additional ImageTypes #64

Closed btittelbach closed 5 years ago

btittelbach commented 5 years ago

This should now be the correct way to do it.

I've added ThumbnailURL and ThumbnailInfo to the ImageMessage struct so Thumbnails can be added, which is important for e.g. mobile clients.

While at it, I've also added strucs for other message types, in case someone needs them, like I needed the thumbnails.

Finally, I've added some comments on what information in what unit a field should contain, if it's not obvious. (e.g. Mastodon has a field "size" in its imageInfo which contains a string like "WxH" )

babolivier commented 5 years ago

Hrm, I just realised I was talking crap the last time. I stupidly followed the link in the comment which was pointing at r0.2 of the spec, while the current stable one is r0.4, which your initial PR is totally compliant with. Therefore, I'm:

babolivier commented 5 years ago

Reopened and merged as #65, sorry again for the overall mess and thank you for your contribution!