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 0c18f06 commit 308b8dc
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 @@ -2793,8 +2793,8 @@ func (portal *Portal) convertPollCreationMessage(intent *appservice.IntentAPI, m
},
}
}
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 308b8dc

Please sign in to comment.