4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 16:39:24 +00:00

Allow a webhookurl per channel (discord). #239

This commit is contained in:
Wim
2017-08-12 14:51:41 +02:00
parent ad4d461606
commit 28710d0bc7
14 changed files with 100 additions and 49 deletions

View File

@ -63,13 +63,13 @@ func (b *Bmatrix) Disconnect() error {
return nil
}
func (b *Bmatrix) JoinChannel(channel string) error {
resp, err := b.mc.JoinRoom(channel, "", nil)
func (b *Bmatrix) JoinChannel(channel config.ChannelInfo) error {
resp, err := b.mc.JoinRoom(channel.Name, "", nil)
if err != nil {
return err
}
b.Lock()
b.RoomMap[resp.RoomID] = channel
b.RoomMap[resp.RoomID] = channel.Name
b.Unlock()
return err
}