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/gitter/gitter.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bridge/gitter/gitter.go') diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go index f234b6bb..8f57ed94 100644 --- a/bridge/gitter/gitter.go +++ b/bridge/gitter/gitter.go @@ -97,15 +97,15 @@ func (b *Bgitter) JoinChannel(channel config.ChannelInfo) error { return nil } -func (b *Bgitter) Send(msg config.Message) error { +func (b *Bgitter) Send(msg config.Message) (string, error) { flog.Debugf("Receiving %#v", msg) roomID := b.getRoomID(msg.Channel) if roomID == "" { flog.Errorf("Could not find roomID for %v", msg.Channel) - return nil + return "", nil } // add ZWSP because gitter echoes our own messages - return b.c.SendMessage(roomID, msg.Username+msg.Text+" ​") + return "", b.c.SendMessage(roomID, msg.Username+msg.Text+" ​") } func (b *Bgitter) getRoomID(channel string) string { -- cgit v1.2.3