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

Modify Send() to return also a message id

This commit is contained in:
Wim
2017-08-27 22:59:37 +02:00
parent cfb8107138
commit 5a8d7b5f6d
13 changed files with 41 additions and 35 deletions

View File

@ -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)
}