From c557d51b6faf146e67ececceaeb731a87e1a498b Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 2 Mar 2019 20:31:38 +0100 Subject: Need to specify /topic:mytopic for channel configuration (zulip). (#751) Breaking change for zulip channel configuration. For zulip the channel configuration will now need to specify also the topic with /topic:yourtopic. Example: [[gateway.inout]] account="zulip.streamchat" channel="general/topic:mytopic" This fixes the incorrect PR #701 which didn't work with multiple gateways. --- gateway/gateway.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gateway') diff --git a/gateway/gateway.go b/gateway/gateway.go index be45086b..82be2a98 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -159,6 +159,10 @@ func (gw *Gateway) mapChannelConfig(cfg []config.Bridge, direction string) { gw.logger.Errorf("Mattermost channels do not start with a #: remove the # in %s", br.Channel) os.Exit(1) } + if strings.HasPrefix(br.Account, "zulip.") && !strings.Contains(br.Channel, "/topic:") { + gw.logger.Errorf("Breaking change, since matterbridge 1.14.0 zulip channels need to specify the topic with channel/topic:mytopic in %s of %s", br.Channel, br.Account) + os.Exit(1) + } ID := br.Channel + br.Account if _, ok := gw.Channels[ID]; !ok { channel := &config.ChannelInfo{ -- cgit v1.2.3