summaryrefslogtreecommitdiff
path: root/internal/api/model/poll.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/model/poll.go')
-rw-r--r--internal/api/model/poll.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/api/model/poll.go b/internal/api/model/poll.go
index a9842e7a9..7eddb66ef 100644
--- a/internal/api/model/poll.go
+++ b/internal/api/model/poll.go
@@ -17,6 +17,8 @@
package model
+import "github.com/superseriousbusiness/gotosocial/internal/language"
+
// Poll represents a poll attached to a status.
//
// swagger:model poll
@@ -104,3 +106,22 @@ type PollVoteRequest struct {
// indices. Can be strings or integers.
ChoicesI []interface{} `json:"choices"`
}
+
+// WebPollOption models a template-ready poll option entry.
+//
+// swagger:ignore
+type WebPollOption struct {
+ PollOption
+
+ // Emojis contained on parent poll.
+ Emojis []Emoji
+
+ // LanguageTag of parent status.
+ LanguageTag *language.Language
+
+ // Share of total votes as a percentage.
+ VoteShare float32
+
+ // String-formatted version of VoteShare.
+ VoteShareStr string
+}