Fix linting (whatsapp)

This commit is contained in:
Wim 2022-03-13 23:51:08 +01:00
parent fffa29c2f3
commit d64eed49bc
2 changed files with 2 additions and 3 deletions

View File

@ -44,6 +44,7 @@ func (b *Bwhatsapp) handleMessage(message *events.Message) {
} }
} }
// nolint:funlen
func (b *Bwhatsapp) handleTextMessage(messageInfo types.MessageInfo, msg *proto.Message) { func (b *Bwhatsapp) handleTextMessage(messageInfo types.MessageInfo, msg *proto.Message) {
senderJID := messageInfo.Sender senderJID := messageInfo.Sender
channel := messageInfo.Chat channel := messageInfo.Chat
@ -60,6 +61,7 @@ func (b *Bwhatsapp) handleTextMessage(messageInfo types.MessageInfo, msg *proto.
var text string var text string
// nolint:nestif
if msg.GetExtendedTextMessage() == nil { if msg.GetExtendedTextMessage() == nil {
text = msg.GetConversation() text = msg.GetConversation()
} else { } else {

View File

@ -325,9 +325,6 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) {
message.Conversation = &text message.Conversation = &text
ID := whatsmeow.GenerateMessageID() ID := whatsmeow.GenerateMessageID()
b.Log.Debugf("=> Sending %#v", message)
_, err := b.wc.SendMessage(groupJID, ID, &message) _, err := b.wc.SendMessage(groupJID, ID, &message)
return ID, err return ID, err