forked from jshiffer/matterbridge
Fix linting (whatsapp)
This commit is contained in:
parent
496d5b4ec7
commit
952221d3b9
@ -1,3 +1,4 @@
|
|||||||
|
// nolint:goconst
|
||||||
package bwhatsapp
|
package bwhatsapp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -134,6 +135,7 @@ func (b *Bwhatsapp) HandleTextMessage(message whatsapp.TextMessage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HandleImageMessage sent from WhatsApp, relay it to the brige
|
// HandleImageMessage sent from WhatsApp, relay it to the brige
|
||||||
|
// nolint:funlen
|
||||||
func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) {
|
func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) {
|
||||||
if message.Info.FromMe || message.Info.Timestamp < b.startedAt {
|
if message.Info.FromMe || message.Info.Timestamp < b.startedAt {
|
||||||
return
|
return
|
||||||
|
@ -111,8 +111,7 @@ func (b *Bwhatsapp) getSenderName(senderJid string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// try to reload this contact
|
// try to reload this contact
|
||||||
_, err := b.conn.Contacts()
|
if _, err := b.conn.Contacts(); err != nil {
|
||||||
if err != nil {
|
|
||||||
b.Log.Errorf("error on update of contacts: %v", err)
|
b.Log.Errorf("error on update of contacts: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user