Fix last_fetched_at not being set on polls (#10170)

pull/935/head
Eugen Rochko 2019-03-05 04:10:01 +01:00 committed by GitHub
parent a198add83b
commit 4037b5eb1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class ActivityPub::FetchRemotePollService < BaseService
poll.votes.delete_all if latest_options != poll.options poll.votes.delete_all if latest_options != poll.options
poll.update!( poll.update!(
last_fetched_at: Time.now.utc,
expires_at: expires_at, expires_at: expires_at,
options: latest_options, options: latest_options,
cached_tallies: items.map { |item| item.dig('replies', 'totalItems') || 0 } cached_tallies: items.map { |item| item.dig('replies', 'totalItems') || 0 }