diff --git a/app/models/user.rb b/app/models/user.rb index 310ec77a15..ce24d34651 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -350,7 +350,7 @@ class User < ApplicationRecord end def revoke_access! - Doorkeeper::AccessGrant.by_resource_owner(self).update_all(revoked_at: Time.now.utc) + Doorkeeper::AccessGrant.by_resource_owner(self).touch_all(:revoked_at) Doorkeeper::AccessToken.by_resource_owner(self).in_batches do |batch| batch.touch_all(:revoked_at) diff --git a/spec/services/reblog_service_spec.rb b/spec/services/reblog_service_spec.rb index f807536a2e..ca3ee3ccdf 100644 --- a/spec/services/reblog_service_spec.rb +++ b/spec/services/reblog_service_spec.rb @@ -46,7 +46,7 @@ RSpec.describe ReblogService do Status .where(id: reblog_of_id) .where(text: 'discard-status-text') - .update_all(deleted_at: Time.now.utc) + .touch_all(:deleted_at) end end end