Immediately display poll results to poll author (#10187)

* Immediately display poll results to poll author

* Refactor Poll#loaded_options and add Poll#voted? to improve DRYness
This commit is contained in:
Eugen Rochko
2019-03-07 22:53:47 +01:00
committed by GitHub
parent 75cb93676b
commit 054bbb3da2
4 changed files with 14 additions and 24 deletions

View File

@ -122,11 +122,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer
end
def poll_options
if !object.poll.expired? && object.poll.hide_totals?
object.poll.unloaded_options
else
object.poll.loaded_options
end
object.poll.loaded_options
end
def poll_and_multiple?