From 3c36f651beafbaeca36a7112a47378e8a4d19d7d Mon Sep 17 00:00:00 2001 From: ldruschk <14059613+ldruschk@users.noreply.github.com> Date: Sat, 18 Apr 2020 22:05:27 +0200 Subject: 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. --- gateway/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } } -- cgit v1.2.3