about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-04 00:39:06 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-04 00:39:06 +0100
commite13d3792f322c6313fde10d639b13bc31723ec63 (patch)
treef78d71564fd4f2cd83dfb40ccf6f0fcd6254f39e /app/services
parent5dfa4336985616cf5652de2f1cf794d8f740424e (diff)
Make sure the poll is created before storing its id (#10142)
* Make sure the poll is created before storing its id

* Fix updating poll results

* Support fetching Question activities from the search bar
Diffstat (limited to 'app/services')
-rw-r--r--app/services/activitypub/fetch_remote_poll_service.rb2
-rw-r--r--app/services/resolve_url_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/activitypub/fetch_remote_poll_service.rb b/app/services/activitypub/fetch_remote_poll_service.rb
index 6f0ac5624..ea75e8ef9 100644
--- a/app/services/activitypub/fetch_remote_poll_service.rb
+++ b/app/services/activitypub/fetch_remote_poll_service.rb
@@ -46,6 +46,6 @@ class ActivityPub::FetchRemotePollService < BaseService
   end
 
   def expected_type?
-    equals_or_includes_any?(@json['type'], 'Question')
+    equals_or_includes_any?(@json['type'], %w(Question))
   end
 end
diff --git a/app/services/resolve_url_service.rb b/app/services/resolve_url_service.rb
index ed0c56923..b98759bf6 100644
--- a/app/services/resolve_url_service.rb
+++ b/app/services/resolve_url_service.rb
@@ -20,7 +20,7 @@ class ResolveURLService < BaseService
   def process_url
     if equals_or_includes_any?(type, %w(Application Group Organization Person Service))
       FetchRemoteAccountService.new.call(atom_url, body, protocol)
-    elsif equals_or_includes_any?(type, %w(Note Article Image Video Page))
+    elsif equals_or_includes_any?(type, %w(Note Article Image Video Page Question))
       FetchRemoteStatusService.new.call(atom_url, body, protocol)
     end
   end