summaryrefslogtreecommitdiffstats
path: root/bridge/matrix
diff options
context:
space:
mode:
authorDuco van Amstel <duco.vanamstel@gmail.com>2018-11-15 19:43:43 +0000
committerWim <wim@42.be>2018-11-15 20:43:43 +0100
commitce21ba154585395e792c059ac156299071405247 (patch)
treef76f4617cc2c099a9a2e97bc85fce28cf04010b1 /bridge/matrix
parentc89085bf44333b4decd75e30cec5849dca859938 (diff)
downloadmatterbridge-msglm-ce21ba154585395e792c059ac156299071405247.tar.gz
matterbridge-msglm-ce21ba154585395e792c059ac156299071405247.tar.bz2
matterbridge-msglm-ce21ba154585395e792c059ac156299071405247.zip
Fix golint linter issues and enable it in CI (#593)
Diffstat (limited to 'bridge/matrix')
-rw-r--r--bridge/matrix/matrix.go10
1 files changed, 5 insertions, 5 deletions
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