witchent / matrix-puppet-signal

A Signal bridge for Matrix
35 stars 2 forks source link

Text included with an image is missed easily #12

Closed batu-one closed 4 years ago

batu-one commented 4 years ago

Whenever I receive an image with text included, the text get put in the image's "body" attribute. This causes some inconvenience.

For example: I get sent an image, and the text 'Look at this thing!' is included. On riot-desktop, this is not that much of an issue as the text appears below the image like 'Download Look at this thing! (500KB)'. On riot-mobile the text is hidden, and I can only view the text by viewing the message source. This causes me to miss a piece of communication often times.

I've seen other bridges put the actual filename of the image in the "body" attribute and the included text in an extra separate message.

witchent commented 4 years ago

Yes I thought that this issue will come up at one point. To be honest, this is a really dirty hack that I did when I wanted to support images and replies. Signal handles images with a text included as one message, while matrix does not. So if I want to support images and text I have to do some hacking. E.g. if someone in signal quotes the message with text, would I quote the image or the text in matrix? As I did not have a good answer, this seemed to be an edge case for me, and it would probably take a lot of work to get it working (suddenly event ids would not be unique anymore) I decided to implement it like this.

I do agree though that this is suboptimal, so I leave this issue open, but I will probably not change it any time soon until I think I have a good way how it should look and behave like.

witchent commented 4 years ago

This is done the way you wanted it to be done in mautrix-signal.