diff options
author | Wim <wim@42.be> | 2017-08-27 22:59:37 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-08-27 22:59:37 +0200 |
commit | 5a8d7b5f6d30bf4d3ee93fe9593e0b3504ad684a (patch) | |
tree | 62f8534833b4184606980d1b61b44bbec8898fed /bridge/matrix | |
parent | cfb810713872a5f95a5a54c449fef3bce5aa05b5 (diff) | |
download | matterbridge-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/matrix')
-rw-r--r-- | bridge/matrix/matrix.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go index b37738c6..1cad6221 100644 --- a/bridge/matrix/matrix.go +++ b/bridge/matrix/matrix.go @@ -74,17 +74,17 @@ func (b *Bmatrix) JoinChannel(channel config.ChannelInfo) error { return err } -func (b *Bmatrix) Send(msg config.Message) error { +func (b *Bmatrix) Send(msg config.Message) (string, error) { flog.Debugf("Receiving %#v", msg) channel := b.getRoomID(msg.Channel) flog.Debugf("Sending to channel %s", channel) if msg.Event == config.EVENT_USER_ACTION { b.mc.SendMessageEvent(channel, "m.room.message", matrix.TextMessage{"m.emote", msg.Username + msg.Text}) - return nil + return "", nil } b.mc.SendText(channel, msg.Username+msg.Text) - return nil + return "", nil } func (b *Bmatrix) getRoomID(channel string) string { |