Add info for matrix image messages#2228
Conversation
|
I guess it should be closed then. |
I assume this should then apply to #2227 |
|
Hi, I was able to merge and test your pull request to work on my fork, though I did not try telegram. It looks like either of the following pull requests should fix the matrix authenticated problem now. I tested and only merged #2225 since its simpler. I'm going to start maintaining a fork of matterbridge to accept and merge pull requests regarding irc -> matrix -> discord since our organization needs this bridge to work. However, I can only test irc -> matrix -> discord so will need more people to help provide pull requests proven to fix the whatsapp and telegram issues. If anyone else is able to help test whatsapp and telegram please provide tested pull requests. https://github.com/bibanon/matterbridge/ Download linux intel 64-bit binary: https://github.com/bibanon/matterbridge/releases/tag/v1.26.1 |
This pull request adds image info (mtype, width, height) to the matrix message. It uses b.mc.SendMessageEvent instead of b.mc.SendImage to include the info part.
Images sent to matrix get shown in element but when using mautrix (signal) bridge to further forward the image it does not get recognized as image but is being treated as file.
Fileinfo is optional (https://spec.matrix.org/v1.14/client-server-api/#mimage).
There are different options dealing with metainfo:
To properly display images in signal mautrix signal could be changed to accept image messages without imageinfo (c), or gomatrix could include this (b1) (archived repo: https://github.com/matrix-org/gomatrix so no changes to be expected here) or it can be implemented here (b2). I decided to go for the latter. It works for me.
I am dealing with messages from telegram bridged to matrix. The telegram message includes the width and height. It would even be possible to forward this metainformation through matterbridge (a) but I did not see an easy way to accomplish this.