From ce21ba154585395e792c059ac156299071405247 Mon Sep 17 00:00:00 2001 From: Duco van Amstel Date: Thu, 15 Nov 2018 19:43:43 +0000 Subject: Fix golint linter issues and enable it in CI (#593) --- bridge/matrix/matrix.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bridge/matrix') diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go index aaf19326..46dfef39 100644 --- a/bridge/matrix/matrix.go +++ b/bridge/matrix/matrix.go @@ -72,7 +72,7 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) { b.Log.Debugf("Channel %s maps to channel id %s", msg.Channel, channel) // Make a action /me of the message - if msg.Event == config.EVENT_USER_ACTION { + if msg.Event == config.EventUserAction { m := matrix.TextMessage{ MsgType: "m.emote", Body: msg.Username + msg.Text, @@ -85,7 +85,7 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) { } // Delete message - if msg.Event == config.EVENT_MSG_DELETE { + if msg.Event == config.EventMsgDelete { if msg.ID == "" { return "", nil } @@ -173,16 +173,16 @@ func (b *Bmatrix) handleEvent(ev *matrix.Event) { // Delete event if ev.Type == "m.room.redaction" { - rmsg.Event = config.EVENT_MSG_DELETE + rmsg.Event = config.EventMsgDelete rmsg.ID = ev.Redacts - rmsg.Text = config.EVENT_MSG_DELETE + rmsg.Text = config.EventMsgDelete b.Remote <- rmsg return } // Do we have a /me action if ev.Content["msgtype"].(string) == "m.emote" { - rmsg.Event = config.EVENT_USER_ACTION + rmsg.Event = config.EventUserAction } // Do we have attachments -- cgit v1.2.3