diff options
author | Wim <wim@42.be> | 2019-03-02 20:31:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-02 20:31:38 +0100 |
commit | c557d51b6faf146e67ececceaeb731a87e1a498b (patch) | |
tree | 632be4cb5390df898d2d0cfe0b2f4c3bbb30ce7a /gateway/gateway.go | |
parent | df3fdc26a01a20c3568b824f4f15f9b56a2f3db3 (diff) | |
download | matterbridge-msglm-c557d51b6faf146e67ececceaeb731a87e1a498b.tar.gz matterbridge-msglm-c557d51b6faf146e67ececceaeb731a87e1a498b.tar.bz2 matterbridge-msglm-c557d51b6faf146e67ececceaeb731a87e1a498b.zip |
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.
Diffstat (limited to 'gateway/gateway.go')
-rw-r--r-- | gateway/gateway.go | 4 |
1 files changed, 4 insertions, 0 deletions
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{ |