about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-08-14 23:57:46 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-14 16:57:46 +0200
commita855956185630742ad670f971337a3ff76fd8b32 (patch)
tree94dc8eacdea1d5d295920fb987f442fd0f7fda88 /app/lib
parent5b9ae7981e2458a322f9e2fbeac9b334a15936bc (diff)
Fix ActivityPub follow interaction and add more specs (#4601)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity/accept.rb2
-rw-r--r--app/lib/activitypub/activity/reject.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/accept.rb b/app/lib/activitypub/activity/accept.rb
index f5880937a..44c432ae7 100644
--- a/app/lib/activitypub/activity/accept.rb
+++ b/app/lib/activitypub/activity/accept.rb
@@ -20,6 +20,6 @@ class ActivityPub::Activity::Accept < ActivityPub::Activity
   end
 
   def target_uri
-    @target_uri ||= @object['object'].is_a?(String) ? @object['object'] : @object['object']['id']
+    @target_uri ||= @object['actor']
   end
 end
diff --git a/app/lib/activitypub/activity/reject.rb b/app/lib/activitypub/activity/reject.rb
index 78dbfd1e5..6a234994e 100644
--- a/app/lib/activitypub/activity/reject.rb
+++ b/app/lib/activitypub/activity/reject.rb
@@ -20,6 +20,6 @@ class ActivityPub::Activity::Reject < ActivityPub::Activity
   end
 
   def target_uri
-    @target_uri ||= @object['object'].is_a?(String) ? @object['object'] : @object['object']['id']
+    @target_uri ||= @object['actor']
   end
 end