diff --git a/bridge/config/config.go b/bridge/config/config.go index 677fde11..5ccf6041 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -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 diff --git a/gateway/gateway.go b/gateway/gateway.go index f276bb64..32c28617 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -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) }