summaryrefslogtreecommitdiffstats
path: root/bridge/matrix/matrix.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/matrix/matrix.go')
-rw-r--r--bridge/matrix/matrix.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go
index 95ba6b42..ba02d4aa 100644
--- a/bridge/matrix/matrix.go
+++ b/bridge/matrix/matrix.go
@@ -73,8 +73,11 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) {
// Make a action /me of the message
if msg.Event == config.EVENT_USER_ACTION {
- resp, err := b.mc.SendMessageEvent(channel, "m.room.message",
- matrix.TextMessage{"m.emote", msg.Username + msg.Text})
+ m := matrix.TextMessage{
+ MsgType: "m.emote",
+ Body: msg.Username + msg.Text,
+ }
+ resp, err := b.mc.SendMessageEvent(channel, "m.room.message", m)
if err != nil {
return "", err
}
@@ -158,7 +161,8 @@ func (b *Bmatrix) handleEvent(ev *matrix.Event) {
// Text must be a string
if rmsg.Text, ok = ev.Content["body"].(string); !ok {
- b.Log.Errorf("Content[body] wasn't a %T ?", rmsg.Text)
+ b.Log.Errorf("Content[body] is not a string: %T\n%#v",
+ ev.Content["body"], ev.Content)
return
}