From 833ffce2df68ae3b673e230fcb273da5d8c4681f Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 4 Mar 2019 22:51:23 +0100 Subject: 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 --- app/lib/activitypub/activity/create.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/lib/activitypub') diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index fc4c45692..07ef16bf3 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -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) -- cgit