matrix-org / matrix-appservice-discord

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

Messages with text and attachments that are edited lose all attachments #859

Closed SethFalco closed 5 months ago

SethFalco commented 1 year ago
  1. Send a message from Discord that contains both content and an attachment
  2. Edit that message on Discord

The message is split into multiple messages on the Matrix side. (Which is fine.) The attachments first, then the content.

But when the message is edited, the first associated message (the attachment) is edited and replaced with the text content of the edit and other messages remain intact.


Initial message from Discord, a single message that contains both content and an attachment.

image

How it appears in Matrix, 2 messages, first the attachment then the content.

image

I edit the message on the Discord side to change the content.

image

On Matrix, the first of the two messages is replaced with the edited content, but the attachment is lost.

image

erkinalp commented 1 year ago

In Discord API 10 and newer, attachments must be re-supplied when the message is being edited.

SethFalco commented 1 year ago

I don't think that's the problem.

On Matrix, the message is split, the issue is just that the message with the attachment is being updated instead of the message with the text content.

At least in this particular scenario, the fix would just be to update the 2nd message instead of the 1st.

Miepee commented 1 year ago

I wonder if fixing #769 would fix this too.

SethFalco commented 5 months ago

Closing this, as it's adequately described in #893, and we don't need the duplicate issues.