Thumbnail

rani/matterbridge.git

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

commit 9fc2968fe84f09f225768d096454838196a78b81 Author: Wim <wim@42.be> Date: Mon Jun 05 23:12:19 2017 +0000 Add gateway name to messages diff --git a/bridge/config/config.go b/bridge/config/config.go index 243f660..ac00307 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -236 +237 @@ type Message struct {   Account string   Event string   Protocol string + Gateway string   Timestamp time.Time  }   diff --git a/gateway/gateway.go b/gateway/gateway.go index 8ca504e..27a48c7 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -2006 +2007 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) {   }   log.Debugf("Sending %#v from %s (%s) to %s (%s)", msg, msg.Account, originchannel, dest.Account, channel.Name)   msg.Channel = channel.Name + msg.Gateway = gw.Name   gw.modifyAvatar(&msg, dest)   gw.modifyUsername(&msg, dest)   // for api we need originchannel as channel