Skip to content

Conversation

@c-holtermann
Copy link

@c-holtermann c-holtermann commented May 9, 2025

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:

  • a) forward if present in received message
  • b) (re)generate when sending
  • c) (or in my case make the next bridge accept images without 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.

@c-holtermann
Copy link
Author

c-holtermann commented May 9, 2025

Duplicates #2225 It's actually #2227 that duplicates #2225.

@bkil
Copy link

bkil commented May 10, 2025

I guess it should be closed then.

@c-holtermann
Copy link
Author

I guess it should be closed then.

I assume this should then apply to #2227

@antonizoon
Copy link

antonizoon commented Jun 2, 2025

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.

#2225

#2227

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants