From 5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 27 Aug 2017 22:59:37 +0200 Subject: Modify Send() to return also a message id --- gateway/gateway.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gateway') 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) } -- cgit v1.2.3