mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-15 07:30:26 +00:00
Handle unthreaded messages (mattermost). Fixes #803
This commit is contained in:
parent
1e6a2bc8f7
commit
0b03076a9d
@ -121,6 +121,12 @@ func (b *Bmattermost) Send(msg config.Message) (string, error) {
|
|||||||
return msg.ID, b.mc.DeleteMessage(msg.ID)
|
return msg.ID, b.mc.DeleteMessage(msg.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle prefix hint for unthreaded messages.
|
||||||
|
if msg.ParentID == "msg-parent-not-found" {
|
||||||
|
msg.ParentID = ""
|
||||||
|
msg.Text = fmt.Sprintf("[thread]: %s", msg.Text)
|
||||||
|
}
|
||||||
|
|
||||||
// Upload a file if it exists
|
// Upload a file if it exists
|
||||||
if msg.Extra != nil {
|
if msg.Extra != nil {
|
||||||
for _, rmsg := range helper.HandleExtra(&msg, b.General) {
|
for _, rmsg := range helper.HandleExtra(&msg, b.General) {
|
||||||
|
Loading…
Reference in New Issue
Block a user