Skip to content

Commit

Permalink
Fix last_fetched_at not being set on polls (mastodon#10170)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent 52beeb0 commit f7ed0f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/services/activitypub/fetch_remote_poll_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def call(poll, on_behalf_of = nil)
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 }
Expand Down

0 comments on commit f7ed0f6

Please sign in to comment.