summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost
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/mattermost
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/mattermost')
-rw-r--r--bridge/mattermost/mattermost.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index 3de7e553..e7f125bd 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -136,7 +136,7 @@ func (b *Bmattermost) JoinChannel(channel config.ChannelInfo) error {
return nil
}
-func (b *Bmattermost) Send(msg config.Message) error {
+func (b *Bmattermost) Send(msg config.Message) (string, error) {
flog.Debugf("Receiving %#v", msg)
if msg.Event == config.EVENT_USER_ACTION {
msg.Text = "*" + msg.Text + "*"
@@ -158,12 +158,12 @@ func (b *Bmattermost) Send(msg config.Message) error {
err := b.mh.Send(matterMessage)
if err != nil {
flog.Info(err)
- return err
+ return "", err
}
- return nil
+ return "", nil
}
b.mc.PostMessage(b.mc.GetChannelId(channel, ""), message)
- return nil
+ return "", nil
}
func (b *Bmattermost) handleMatter() {