diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 2bc33c04bfeb65..f55dd35b2c7f85 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -234,7 +234,7 @@ def process_poll @account.polls.new( multiple: multiple, expires_at: expires_at, - options: items.map { |item| item['name'].presence || item['content'] }, + options: items.map { |item| item['name'].presence || item['content'] }.compact, cached_tallies: items.map { |item| item.dig('replies', 'totalItems') || 0 } ) end