mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 09:20:27 +00:00
Fix linting (whatsapp)
This commit is contained in:
parent
fffa29c2f3
commit
d64eed49bc
@ -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 {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user