Store remote votes URI (#10158)
* Store remote votes URI * Add spec for accepting remote votes * Make poll vote id generation work the same way as follows
This commit is contained in:
parent
7a25bb858a
commit
833ffce2df
6 changed files with 33 additions and 3 deletions
|
@ -241,7 +241,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
|
||||
def poll_vote?
|
||||
return false if replied_to_status.nil? || replied_to_status.poll.nil? || !replied_to_status.local? || !replied_to_status.poll.options.include?(@object['name'])
|
||||
replied_to_status.poll.votes.create!(account: @account, choice: replied_to_status.poll.options.index(@object['name']))
|
||||
replied_to_status.poll.votes.create!(account: @account, choice: replied_to_status.poll.options.index(@object['name']), uri: @object['id'])
|
||||
end
|
||||
|
||||
def resolve_thread(status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue