about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-01-13 16:07:40 +0100
committerGitHub <noreply@github.com>2020-01-13 16:07:40 +0100
commitddcf78d8d3e2a8cb9aa04f8ff42f9d8e185b0354 (patch)
tree14bcdbeac5f8d904cad3d13a469869c5baf9db99 /app/services
parent180f1383943ad171d8394ef9af7c7861bfc08056 (diff)
parent83f8bf48d91605fa63325b4d4acec717031da025 (diff)
Merge pull request #1263 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services')
-rw-r--r--app/services/activitypub/process_collection_service.rb2
-rw-r--r--app/services/fetch_resource_service.rb2
-rw-r--r--app/services/vote_service.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/services/activitypub/process_collection_service.rb b/app/services/activitypub/process_collection_service.rb
index a2a2e7071..e6ccaccc9 100644
--- a/app/services/activitypub/process_collection_service.rb
+++ b/app/services/activitypub/process_collection_service.rb
@@ -37,7 +37,7 @@ class ActivityPub::ProcessCollectionService < BaseService
   end
 
   def process_item(item)
-    activity = ActivityPub::Activity.factory(item, @account, @options)
+    activity = ActivityPub::Activity.factory(item, @account, **@options)
     activity&.perform
   end
 
diff --git a/app/services/fetch_resource_service.rb b/app/services/fetch_resource_service.rb
index 34382d279..abe7766d4 100644
--- a/app/services/fetch_resource_service.rb
+++ b/app/services/fetch_resource_service.rb
@@ -3,7 +3,7 @@
 class FetchResourceService < BaseService
   include JsonLdHelper
 
-  ACCEPT_HEADER = 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html'
+  ACCEPT_HEADER = 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html;q=0.1'
 
   def call(url)
     return if url.blank?
diff --git a/app/services/vote_service.rb b/app/services/vote_service.rb
index cb7dce6e8..19e453332 100644
--- a/app/services/vote_service.rb
+++ b/app/services/vote_service.rb
@@ -20,7 +20,7 @@ class VoteService < BaseService
 
         ApplicationRecord.transaction do
           @choices.each do |choice|
-            @votes << @poll.votes.create!(account: @account, choice: choice)
+            @votes << @poll.votes.create!(account: @account, choice: Integer(choice))
           end
         end
       else