File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -670,10 +670,32 @@ func (cli *Client) sendNewsletter(
670670 plaintextNode .Attrs ["mediatype" ] = mediaType
671671 }
672672 }
673+ content := []waBinary.Node {}
674+ if attrs ["type" ] == "poll" {
675+ var node waBinary.Node
676+ if message .PollUpdateMessage == nil {
677+ node = waBinary.Node {
678+ Tag : "meta" ,
679+ Attrs : waBinary.Attrs {
680+ "polltype" : "creation" ,
681+ "contenttype" : "text" ,
682+ },
683+ }
684+ } else {
685+ node = waBinary.Node {
686+ Tag : "meta" ,
687+ Attrs : waBinary.Attrs {
688+ "polltype" : "vote" ,
689+ },
690+ }
691+ }
692+ content = append (content , node )
693+ }
694+ content = append (content , plaintextNode )
673695 node := waBinary.Node {
674696 Tag : "message" ,
675697 Attrs : attrs ,
676- Content : []waBinary. Node { plaintextNode } ,
698+ Content : content ,
677699 }
678700 start = time .Now ()
679701 data , err := cli .sendNodeAndGetData (node )
You can’t perform that action at this time.
0 commit comments