4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 08:49:24 +00:00

Modify Send() to return also a message id

This commit is contained in:
Wim
2017-08-27 22:59:37 +02:00
parent cfb8107138
commit 5a8d7b5f6d
13 changed files with 41 additions and 35 deletions

View File

@ -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() {