matrix-org / matrix-appservice-discord

A bridge between Matrix and Discord.
Apache License 2.0
792 stars 148 forks source link

Discord -> Matrix: Gif feature should result in image, not link #762

Open tgr opened 2 years ago

tgr commented 2 years ago

When using the "Gif" feature in Discord: matrix (2) it results in some image: matrix (3) but on the Matrix side it's shared as a link: Element-Magyar-Wikipédia-Discord-tesztszoba (3)

sagehane commented 2 years ago

I personally prefer the status quo. I feel like converting links to images should be left up to url previews (and I personally like to disable url previews).

Images are also more costly to send than mere links.

tgr commented 2 years ago

IMO the bridge's job should be to translate messages with a look and behavior as close to the original as possible, to avoid creating disconnects between the two groups of users. Transforming them into something different that's more convenient for the user is the job of the client.

sagehane commented 2 years ago

Transforming them into something different that's more convenient for the user is the job of the client.

By that logic, shouldn't it be the client's job to enable url previews by default or not? How can the client transform it to something more convenient? Is the client expected to reverse image search every image it receives and ask the users if they would want to convert it to a matching url?

Your proposal does indeed make the "look" from Discord -> Matrix close to the original as possible, but as far as "behavior" goes, it would be quite different. It also causes inconsistencies.

Discord -> Matrix would create a seemingly unnecessary image for Matrix, which fails to replicate the behavior. Sending the url from Matrix -> Discord would cause the same problem you outlined but in reverse (link shown on Matrix's side, image on Discord), and there would be no sane way to fix that without relying on url previews anyways.

The only workaround I can imagine to that is to expect Matrix users to never send links and send images instead, but that would also end up sending an image to Discord when a link would have sufficed for them. That would just introduce another disparity in behavior.

I don't think your proposal makes sense in terms of consistent behavior between both sides of the bridge.

Miepee commented 2 years ago

I personally disagree with this change as well. Discord also does have an option to disable URL previews (Settings -> Text & Images). Which would make this even more inconsistent. With URL preview: image Without: image

So by forcing to always send Gifs as images this would just cause even more inconsistencies and force Matrix users to see an image, where Discord users don't necessarily see one.

hazycora commented 2 years ago

just have it be an option? in the settings?

Miepee commented 2 years ago

nobody sees the gifs on the matrix end

That really depends on the client you're using. They're fine with Element Desktop (I can get the full playing GIF when i click on the preview image) image and look good on Element mobile and even animate there image

If you want the Embed behaviour to change for tenor, this probably should be brought up in the client you're using.

hazycora commented 2 years ago

I am on element mobile, latest version too. my friends don't see gif previews either and they're all on different homeservers, so I don't know how we all aren't seeing gif previews lol