5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-21 21:40:27 +00:00
matterbridge/gateway
Qais Patankar e60949ff3f Support webhook message deletions (discord) (#853)
* Support webhook message deletions (discord)

Messages sent via webhook can now be deleted. It seems it can do this
without any special permissions.

This copies discordgo.WebhookExecute and makes it support the returning
of discordgo.Message.

A pull request has been sent upstream, so we should use that if
@bwmariin accepts the pull request:

https://github.com/bwmarrin/discordgo/pull/663

Changes in behaviour (webhook mode only):
- Previously messages *edited* on other platforms would just be
retransmitted as a brand new message to Discord.
- Message *edits* will now be ignored.
- Debug: message edits will now print out a "permission error".

In the future it may be good to send an "message edited" react to those
webhook messages, so at least people know that the message was edited on
other platforms. (Even though it can't actually show the new message.)

Alternatively, message edits could just send a brand new message with a
link back to the old one. This is a little ugly but it would ensure that
Discord users are able to see the edited message. These "message edit
notifications" would be sent from the bot user (not from a webhook), so
we could edit the "edit notification" if subsequent edits to the
original message are made.
2019-07-08 22:18:37 +02:00
..
bridgemap Forward only user-typing messages if supported by protocol (#832) 2019-05-30 15:00:40 +02: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 Make all loggers derive from non-default instance (#728) 2019-02-23 22:51:27 +01:00
gateway.go Add msg event to tengo 2019-04-24 22:47:37 +02:00
handlers_test.go Support rewriting messages from relaybots using ExtractNicks. Fixes #466 (#730) 2019-02-23 16:35:54 +01:00
handlers.go Forward only user-typing messages if supported by protocol (#832) 2019-05-30 15:00:40 +02:00
router.go Support webhook message deletions (discord) (#853) 2019-07-08 22:18:37 +02:00