summaryrefslogtreecommitdiffstats
path: root/bridge/gitter
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-08-27 22:59:37 +0200
committerWim <wim@42.be>2017-08-27 22:59:37 +0200
commit5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a (patch)
tree62f8534833b4184606980d1b61b44bbec8898fed /bridge/gitter
parentcfb810713872a5f95a5a54c449fef3bce5aa05b5 (diff)
downloadmatterbridge-msglm-5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a.tar.gz
matterbridge-msglm-5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a.tar.bz2
matterbridge-msglm-5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a.zip
Modify Send() to return also a message id
Diffstat (limited to 'bridge/gitter')
-rw-r--r--bridge/gitter/gitter.go6
1 files changed, 3 insertions, 3 deletions
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 {