]> cat aescling's git repositories - mastodon.git/commitdiff
Fix last_fetched_at not being set on polls (#10170)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 5 Mar 2019 03:10:01 +0000 (04:10 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Mar 2019 03:10:01 +0000 (04:10 +0100)
app/services/activitypub/fetch_remote_poll_service.rb

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