matrix-appservice-slack icon indicating copy to clipboard operation
matrix-appservice-slack copied to clipboard

Support editing/removing multipart Slack messages

Open tadzik opened this issue 10 months ago • 1 comments

We may produce multiple Matrix events per Slack events, if the Slack events contains text with attachments. This should have been forbidden with a DB constraint, but for some reason it happened regardless.

This updates the constraint to match reality, differentiating Matrix events by the type of incoming Slack event. For backwards compatibility reasons getEventBySlackId() returns the "main" Matrix event.

When handling message changes and message deletion, we will now correctly edit the right part of the message – either changing the text or removing some of the attachments (fixes https://github.com/matrix-org/matrix-appservice-slack/issues/486). Deleting the whole message will now also remove all the attachments associated with it.

Depends on https://github.com/matrix-org/matrix-appservice-slack/pull/780

Does not support NeDB, but I wonder if we want to support NeDB at all these days (ref https://github.com/matrix-org/matrix-appservice-slack/pull/775)

tadzik avatar Apr 05 '24 13:04 tadzik