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 --- bridge/rocketchat/rocketchat.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bridge/rocketchat') diff --git a/bridge/rocketchat/rocketchat.go b/bridge/rocketchat/rocketchat.go index 3223a781..1e534c20 100644 --- a/bridge/rocketchat/rocketchat.go +++ b/bridge/rocketchat/rocketchat.go @@ -57,7 +57,7 @@ func (b *Brocketchat) JoinChannel(channel config.ChannelInfo) error { return nil } -func (b *Brocketchat) Send(msg config.Message) error { +func (b *Brocketchat) Send(msg config.Message) (string, error) { flog.Debugf("Receiving %#v", msg) matterMessage := matterhook.OMessage{IconURL: b.Config.IconURL} matterMessage.Channel = msg.Channel @@ -67,9 +67,9 @@ func (b *Brocketchat) Send(msg config.Message) error { err := b.mh.Send(matterMessage) if err != nil { flog.Info(err) - return err + return "", err } - return nil + return "", nil } func (b *Brocketchat) handleRocketHook() { -- cgit v1.2.3