You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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.
5 years ago
..
bridgemap Forward only user-typing messages if supported by protocol (#832) 5 years ago
samechannel Make all loggers derive from non-default instance (#728) 5 years ago
bench.tengo Add scripting (tengo) support for every incoming message (#731) 5 years ago
gateway.go Add msg event to tengo 5 years ago
gateway_test.go Make all loggers derive from non-default instance (#728) 5 years ago
handlers.go Forward only user-typing messages if supported by protocol (#832) 5 years ago
handlers_test.go Support rewriting messages from relaybots using ExtractNicks. Fixes #466 (#730) 5 years ago
router.go Support webhook message deletions (discord) (#853) 5 years ago