mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-18 17:12:37 +01:00
Add a prefix handler for unthreaded messages (discord) (#1346)
This commit is contained in:
parent
19d47784bd
commit
6cadf12260
@ -242,6 +242,12 @@ 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 == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user