Skip to content

Commit

Permalink
Add explicit message to polls to use WA to vote
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed May 15, 2024
1 parent 8c8b617 commit 394e46d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3033,8 +3033,8 @@ func (portal *Portal) convertPollCreationMessage(ctx context.Context, intent *ap
},
}
}
body := fmt.Sprintf("%s\n\n%s", msg.GetName(), strings.Join(optionsListText, "\n"))
formattedBody := fmt.Sprintf("<p>%s</p><ol>%s</ol>", event.TextToHTML(msg.GetName()), strings.Join(optionsListHTML, ""))
body := fmt.Sprintf("%s\n\n%s\n\n(This message is a poll. Please open WhatsApp to vote.)", msg.GetName(), strings.Join(optionsListText, "\n"))
formattedBody := fmt.Sprintf("<p>%s</p><ol>%s</ol><p>(This message is a poll. Please open WhatsApp to vote.)</p>", event.TextToHTML(msg.GetName()), strings.Join(optionsListHTML, ""))
maxChoices := int(msg.GetSelectableOptionsCount())
if maxChoices <= 0 {
maxChoices = len(optionNames)
Expand Down

0 comments on commit 394e46d

Please sign in to comment.