Merge remote-tracking branch 'parent/main' into upstream-20240125
This commit is contained in:
commit
9fa938eb0f
68 changed files with 824 additions and 94 deletions
|
@ -357,7 +357,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
already_voted = true
|
||||
|
||||
with_redis_lock("vote:#{replied_to_status.poll_id}:#{@account.id}") do
|
||||
already_voted = poll.votes.where(account: @account).exists?
|
||||
already_voted = poll.votes.exists?(account: @account)
|
||||
poll.votes.create!(account: @account, choice: poll.options.index(@object['name']), uri: object_uri)
|
||||
end
|
||||
|
||||
|
@ -503,7 +503,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
|
||||
return false if local_usernames.empty?
|
||||
|
||||
Account.local.where(username: local_usernames).exists?
|
||||
Account.local.exists?(username: local_usernames)
|
||||
end
|
||||
|
||||
def tombstone_exists?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue