From 009aa60264f62f8ddf7a9b66fa853a33b483a5b5 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Thu, 15 Nov 2018 15:50:37 +0800 Subject: [PATCH] Renamed flag to SyncTopic. --- bridge/config/config.go | 2 +- bridge/slack/slack.go | 2 +- gateway/gateway.go | 2 +- matterbridge.toml.sample | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bridge/config/config.go b/bridge/config/config.go index cbed4214..eb34912d 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -117,7 +117,7 @@ type Protocol struct { ShowEmbeds bool // discord SkipTLSVerify bool // IRC, mattermost StripNick bool // all protocols - SyncTopicChange bool // slack + SyncTopic bool // slack Team string // mattermost Token string // gitter, slack, discord, api Topic string // zulip diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index b9e8693f..5e02003a 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -326,7 +326,7 @@ func (b *Bslack) updateTopicOrPurpose(msg *config.Message, channelInfo *slack.Ch return false, nil } - if !b.GetBool("SyncTopicChange") { + if !b.GetBool("SyncTopic") { return false, nil } diff --git a/gateway/gateway.go b/gateway/gateway.go index 2787d33a..4d7108a3 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -274,7 +274,7 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM return brMsgIDs } // don't relay topic/purpose update if sync is enabled, but msg marked as nosync - if gw.Bridges[dest.Account].GetBool("SyncTopicChange") && strings.HasSuffix(msg.Text, "[nosync]") { + if gw.Bridges[dest.Account].GetBool("SyncTopic") && strings.HasSuffix(msg.Text, "[nosync]") { return brMsgIDs } } diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index ccd12d5b..0d9a8a84 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -772,9 +772,8 @@ ShowTopicChange=false #Enable to sync topic/purpose changes from other bridges #Only works syncing topic changes from slack bridge for now -#Appending "[nosync]" to the topic/purpose will protect it from being synced #OPTIONAL (default false) -SyncTopicChange=false +SyncTopic=false ################################################################### #telegram section