summaryrefslogtreecommitdiffstats
path: root/bridge/telegram
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/telegram
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/telegram')
-rw-r--r--bridge/telegram/telegram.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go
index 748ee87d..7097644e 100644
--- a/bridge/telegram/telegram.go
+++ b/bridge/telegram/telegram.go
@@ -66,7 +66,7 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
}
// map the file SHA to our user (caches the avatar)
- if msg.Event == config.EVENT_AVATAR_DOWNLOAD {
+ if msg.Event == config.EventAvatarDownload {
return b.cacheAvatar(&msg)
}
@@ -75,7 +75,7 @@ func (b *Btelegram) 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
}
@@ -268,7 +268,7 @@ func (b *Btelegram) getFileDirectURL(id string) string {
// sends a EVENT_AVATAR_DOWNLOAD message to the gateway if successful.
// logs an error message if it fails
func (b *Btelegram) handleDownloadAvatar(userid int, channel string) {
- rmsg := config.Message{Username: "system", Text: "avatar", Channel: channel, Account: b.Account, UserID: strconv.Itoa(userid), Event: config.EVENT_AVATAR_DOWNLOAD, Extra: make(map[string][]interface{})}
+ rmsg := config.Message{Username: "system", Text: "avatar", Channel: channel, Account: b.Account, UserID: strconv.Itoa(userid), Event: config.EventAvatarDownload, Extra: make(map[string][]interface{})}
if _, ok := b.avatarMap[strconv.Itoa(userid)]; !ok {
photos, err := b.c.GetUserProfilePhotos(tgbotapi.UserProfilePhotosConfig{UserID: userid, Limit: 1})
if err != nil {