about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-16 23:19:51 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:18 -0500
commitae886ea3e14788ef7966b02502451527080ea5ee (patch)
tree46586c4f05b9f2b2a2bdeaa2bd548bcfe33df9aa /app/services
parentb1e6e6957e62f3da3857f42ec6c343cb9660434d (diff)
[Revise] Do not re-fetch posts the server already has
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fetch_remote_status_service.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/services/fetch_remote_status_service.rb b/app/services/fetch_remote_status_service.rb
index c5e8c5d0f..19b2a28c8 100644
--- a/app/services/fetch_remote_status_service.rb
+++ b/app/services/fetch_remote_status_service.rb
@@ -2,6 +2,9 @@
 
 class FetchRemoteStatusService < BaseService
   def call(url, prefetched_body = nil, on_behalf_of = nil)
+    status = ActivityPub::TagManager.instance.uri_to_resource(url, Status)
+    return status if status.present?
+
     if prefetched_body.nil?
       resource_url, resource_options = FetchResourceService.new.call(url, on_behalf_of: on_behalf_of)
     else