diff options
author | Wim <wim@42.be> | 2017-08-27 22:59:37 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-08-27 22:59:37 +0200 |
commit | 5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a (patch) | |
tree | 62f8534833b4184606980d1b61b44bbec8898fed /gateway | |
parent | cfb810713872a5f95a5a54c449fef3bce5aa05b5 (diff) | |
download | matterbridge-msglm-5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a.tar.gz matterbridge-msglm-5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a.tar.bz2 matterbridge-msglm-5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a.zip |
Modify Send() to return also a message id
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/gateway.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 86fa5723..a7fc4116 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -21,6 +21,12 @@ type Gateway struct { ChannelOptions map[string]config.ChannelOptions Message chan config.Message Name string + Messages map[string][]*BridgeMsg +} + +type BridgeMsg struct { + br *bridge.Bridge + ID string } func New(cfg config.Gateway, r *Router) *Gateway { @@ -162,7 +168,7 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) { if dest.Protocol == "api" { msg.Channel = originchannel } - err := dest.Send(msg) + _, err := dest.Send(msg) if err != nil { fmt.Println(err) } |