Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit c023630cc7f306dd9f49164aa97408d23722e158 Author: Wim <wim@42.be> Date: Wed May 24 22:10:21 2017 +0000 Fix sending to different channels on same account (slack). Closes #177 diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index cc03e9e..eb08500 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -899 +896 @@ func (b *Bslack) JoinChannel(channel string) error {    func (b *Bslack) Send(msg config.Message) error {   flog.Debugf("Receiving %#v", msg) - if msg.Account == b.Account { - return nil - }   nick := msg.Username   message := msg.Text   channel := msg.Channel diff --git a/gateway/gateway.go b/gateway/gateway.go index b550430..4cf4e0e 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -1929 +19210 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) {   return   }   originchannel := msg.Channel + origmsg := msg   for _, channel := range gw.DestChannelFunc(&msg, *dest) {   // do not send to ourself - if channel.ID == getChannelID(msg) { + if channel.ID == getChannelID(origmsg) {   continue   }   log.Debugf("Sending %#v from %s (%s) to %s (%s)", msg, msg.Account, originchannel, dest.Account, channel.Name)