Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit b25c7e891ef0a4979c851cb388bcce978acdbc73 Author: Qais Patankar <qaisjp@gmail.com> Date: Thu Dec 31 16:15:42 2020 +0000 Add a prefix handler for unthreaded messages (discord) (#1346) diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index c8b810c..daeaa40 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -2426 +24212 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) {   msg.Text = "_" + msg.Text + "_"   }   + // Handle prefix hint for unthreaded messages. + if msg.ParentID == "msg-parent-not-found" { + msg.ParentID = "" + msg.Text = fmt.Sprintf("[thread]: %s", msg.Text) + } +   // Use webhook to send the message   useWebhooks := b.shouldMessageUseWebhooks(&msg)   if useWebhooks && msg.Event != config.EventMsgDelete && msg.ParentID == "" {