summaryrefslogtreecommitdiffstats
path: root/bridge/bridge.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-08-12 14:51:41 +0200
committerWim <wim@42.be>2017-08-12 14:51:41 +0200
commit28710d0bc7d5bd564d702953c490a865b0cc438d (patch)
treed025fe274779881442a1cf14d62ec2d42671cc3c /bridge/bridge.go
parentad4d461606b5fb9b64377c8ef37110ee0b3c721b (diff)
downloadmatterbridge-msglm-28710d0bc7d5bd564d702953c490a865b0cc438d.tar.gz
matterbridge-msglm-28710d0bc7d5bd564d702953c490a865b0cc438d.tar.bz2
matterbridge-msglm-28710d0bc7d5bd564d702953c490a865b0cc438d.zip
Allow a webhookurl per channel (discord). #239
Diffstat (limited to 'bridge/bridge.go')
-rw-r--r--bridge/bridge.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/bridge/bridge.go b/bridge/bridge.go
index 8e0fe063..2fe0f076 100644
--- a/bridge/bridge.go
+++ b/bridge/bridge.go
@@ -21,7 +21,7 @@ import (
type Bridger interface {
Send(msg config.Message) error
Connect() error
- JoinChannel(channel string) error
+ JoinChannel(channel config.ChannelInfo) error
Disconnect() error
}
@@ -92,16 +92,10 @@ func (b *Bridge) JoinChannels() error {
}
func (b *Bridge) joinChannels(channels map[string]config.ChannelInfo, exists map[string]bool) error {
- mychannel := ""
for ID, channel := range channels {
if !exists[ID] {
- mychannel = channel.Name
log.Infof("%s: joining %s (%s)", b.Account, channel.Name, ID)
- if b.Protocol == "irc" && channel.Options.Key != "" {
- log.Debugf("using key %s for channel %s", channel.Options.Key, channel.Name)
- mychannel = mychannel + " " + channel.Options.Key
- }
- err := b.JoinChannel(mychannel)
+ err := b.JoinChannel(channel)
if err != nil {
return err
}