summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorldruschk <14059613+ldruschk@users.noreply.github.com>2020-04-18 22:05:27 +0200
committerGitHub <noreply@github.com>2020-04-18 22:05:27 +0200
commit3c36f651beafbaeca36a7112a47378e8a4d19d7d (patch)
treec474109a058783ddb9a91d8b23a96750e4cd6cc0
parent8e6ddadba20135d990046f05d1a5d2b64b019138 (diff)
downloadmatterbridge-msglm-3c36f651beafbaeca36a7112a47378e8a4d19d7d.tar.gz
matterbridge-msglm-3c36f651beafbaeca36a7112a47378e8a4d19d7d.tar.bz2
matterbridge-msglm-3c36f651beafbaeca36a7112a47378e8a4d19d7d.zip
Fix the behavior of ShowTopicChange and SyncTopic (#1086)
Currently, the "topic_change" events are ignored if both, ShowTopicChange and SyncTopic are set, and forwarded otherwise. This pull requests changes the behavior such that the events are only forwarded if one of those two config options is set to true and ignored otherwise.
-rw-r--r--gateway/handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/gateway/handlers.go b/gateway/handlers.go
index edc2bf44..44cefe45 100644
--- a/gateway/handlers.go
+++ b/gateway/handlers.go
@@ -179,7 +179,7 @@ func (gw *Gateway) ignoreEvent(event string, dest *bridge.Bridge) bool {
}
case config.EventTopicChange:
// only relay topic change when used in some way on other side
- if dest.GetBool("ShowTopicChange") && dest.GetBool("SyncTopic") {
+ if !dest.GetBool("ShowTopicChange") && !dest.GetBool("SyncTopic") {
return true
}
}