From 054bbb3da21b2c76374eb921cba862adb8d5a0b3 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 7 Mar 2019 22:53:47 +0100 Subject: 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 --- app/serializers/activitypub/note_serializer.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/serializers/activitypub') diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 3a9e388a5..553f333d8 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -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? -- cgit