5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-21 21:40:27 +00:00
matterbridge/gateway
Wim 6438a3dba3
Add support for deleting files from slack to discord. Fixes #1705 (#1709)
We create a new event EventFileDelete which will be used to delete
specific uploaded files using the Extra["file"] in the config.Message.

We also add a new NativeID key to the FileInfo struct which will contain
the native file ID of the sending bridge.

When a new file is added to the config.Message.Extra["file"] map, now
the bridge native file ID should be added here.

When the receiving bridge receives such a message, it should keep an
internal mapping of NativeID <> bridge fileid/message id. In the case of
discord we map it to the resulted discord message ID after uploading it.

Now when a bridge deletes a file, it should send a EventFileDelete and
setting the ID to the native file ID of the bridge.

When the receiving bridge will get this event it'll look into the
NativeID <> bridge id mapping to find their internal ID and use it to
delete the specific file on their side.

For now this is implemented for slack to discord but this will be add to
other bridges where useful.
2022-02-05 14:45:54 +01:00
..
bridgemap Add support for Harmony (#1656) 2021-12-18 22:43:29 +01:00
samechannel Make all loggers derive from non-default instance (#728) 2019-02-23 22:51:27 +01:00
bench.tengo Add scripting (tengo) support for every incoming message (#731) 2019-02-23 16:39:44 +01:00
gateway_test.go Show deprecate warnings about old tengo settings (#1271) 2020-10-21 20:35:22 +02:00
gateway.go Add support for deleting files from slack to discord. Fixes #1705 (#1709) 2022-02-05 14:45:54 +01:00
handlers_test.go Support rewriting messages from relaybots using ExtractNicks. Fixes #466 (#730) 2019-02-23 16:35:54 +01:00
handlers.go Fix the behavior of ShowTopicChange and SyncTopic (#1086) 2020-04-18 22:05:27 +02:00
router.go Keep the logger on a disabled bridge. Fixes #1616 (#1621) 2021-10-24 19:00:15 +02:00