Merge pull request #498 from kmycode/upstream-20240124
Upstream 20240124
This commit is contained in:
commit
306b96f04c
106 changed files with 1396 additions and 1071 deletions
|
@ -44,7 +44,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService
|
|||
|
||||
# If we fetched a status that already exists, then we need to treat the
|
||||
# activity as an update rather than create
|
||||
activity_json['type'] = 'Update' if equals_or_includes_any?(activity_json['type'], %w(Create)) && Status.where(uri: object_uri, account_id: actor.id).exists?
|
||||
activity_json['type'] = 'Update' if equals_or_includes_any?(activity_json['type'], %w(Create)) && Status.exists?(uri: object_uri, account_id: actor.id)
|
||||
|
||||
with_redis do |redis|
|
||||
discoveries = redis.incr("status_discovery_per_request:#{@request_id}")
|
||||
|
|
|
@ -19,7 +19,7 @@ class VoteService < BaseService
|
|||
already_voted = true
|
||||
|
||||
with_redis_lock("vote:#{@poll.id}:#{@account.id}") do
|
||||
already_voted = @poll.votes.where(account: @account).exists?
|
||||
already_voted = @poll.votes.exists?(account: @account)
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
@choices.each do |choice|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue