Renamed flag to SyncTopic.

This commit is contained in:
Patrick Connolly
2018-11-15 15:50:37 +08:00
parent 95cf8c11d5
commit 009aa60264
4 changed files with 4 additions and 5 deletions

View File

@@ -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

View File

@@ -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
}

View File

@@ -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
}
}

View File

@@ -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