mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 02:32:02 -08:00
Add gateway name to messages
This commit is contained in:
parent
b8a2fcbaff
commit
5f30a98bc1
@ -23,6 +23,7 @@ type Message struct {
|
|||||||
Account string
|
Account string
|
||||||
Event string
|
Event string
|
||||||
Protocol string
|
Protocol string
|
||||||
|
Gateway string
|
||||||
Timestamp time.Time
|
Timestamp time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,6 +200,7 @@ 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)
|
log.Debugf("Sending %#v from %s (%s) to %s (%s)", msg, msg.Account, originchannel, dest.Account, channel.Name)
|
||||||
msg.Channel = channel.Name
|
msg.Channel = channel.Name
|
||||||
|
msg.Gateway = gw.Name
|
||||||
gw.modifyAvatar(&msg, dest)
|
gw.modifyAvatar(&msg, dest)
|
||||||
gw.modifyUsername(&msg, dest)
|
gw.modifyUsername(&msg, dest)
|
||||||
// for api we need originchannel as channel
|
// for api we need originchannel as channel
|
||||||
|
Loading…
Reference in New Issue
Block a user