Add option to enable threading, with default to off.
This commit is contained in:
@@ -99,6 +99,7 @@ type Protocol struct {
|
||||
NoTLS bool // mattermost
|
||||
Password string // IRC,mattermost,XMPP,matrix
|
||||
PrefixMessagesWithNick bool // mattemost, slack
|
||||
PreserveThreading bool // slack
|
||||
Protocol string // all protocols
|
||||
QuoteDisable bool // telegram
|
||||
QuoteFormat string // telegram
|
||||
|
||||
@@ -263,7 +263,7 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM
|
||||
|
||||
// Get the ID of the parent message in thread
|
||||
var canonicalParentMsgID string
|
||||
if msg.ParentID != "" {
|
||||
if msg.ParentID != "" && (gw.Config.General.PreserveThreading || dest.GetBool("PreserveThreading")) {
|
||||
thisParentMsgID := dest.Protocol + " " + msg.ParentID
|
||||
canonicalParentMsgID = gw.FindCanonicalMsgID(thisParentMsgID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user