Use Conversation instead of ExtendedTextMessage (whatsapp)

This commit is contained in:
Wim 2022-03-13 18:05:46 +01:00
parent 5356b3856a
commit 21c4e56d16
1 changed files with 10 additions and 6 deletions

View File

@ -318,17 +318,21 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) {
}
}
var message proto.Message
text := msg.Username + msg.Text
var message proto.Message
message.Conversation = &text
/*
message.ExtendedTextMessage = &proto.ExtendedTextMessage{
Text: &text,
}
b.Log.Debugf("=> Sending %#v", msg)
*/
ID := whatsmeow.GenerateMessageID()
b.Log.Debugf("=> Sending %#v to %#v with ID %s", message, groupJID, ID)
_, err := b.wc.SendMessage(groupJID, ID, &message)
return ID, err