We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52e5e50 commit 7067e1dCopy full SHA for 7067e1d
send.go
@@ -670,10 +670,21 @@ func (cli *Client) sendNewsletter(
670
plaintextNode.Attrs["mediatype"] = mediaType
671
}
672
673
+ content := []waBinary.Node{}
674
+ if attrs["type"] == "poll" {
675
+ content = append(content, waBinary.Node{
676
+ Tag: "meta",
677
+ Attrs: waBinary.Attrs{
678
+ "polltype": "creation",
679
+ "contenttype": "text",
680
+ },
681
+ })
682
+ }
683
+ content = append(content, plaintextNode)
684
node := waBinary.Node{
685
Tag: "message",
686
Attrs: attrs,
- Content: []waBinary.Node{plaintextNode},
687
+ Content: content,
688
689
start = time.Now()
690
data, err := cli.sendNodeAndGetData(node)
0 commit comments