diff options
author | ThibG <thib@sitedethib.com> | 2018-05-18 17:20:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-18 17:20:32 +0200 |
commit | 625c4f36ef394215e65e19157bfaf60e7de94b5f (patch) | |
tree | 72560d046b60c8478d10f26c212a70870e50eb2d /app/lib/activitypub/activity.rb | |
parent | 023dfa119ed43fe35188e560c24cd3091c14ad0b (diff) | |
parent | 765fc6700cefcf326e8e4104f7f82ac5ed9b9bea (diff) |
Merge pull request #490 from glitch-soc/merge-upstream
Merge with tootsuite @ 57b503d4ef0754e4651eae26b628cba60e1ab4e9
Diffstat (limited to 'app/lib/activitypub/activity.rb')
-rw-r--r-- | app/lib/activitypub/activity.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb index 84d4b1752..03476920b 100644 --- a/app/lib/activitypub/activity.rb +++ b/app/lib/activitypub/activity.rb @@ -118,4 +118,13 @@ class ActivityPub::Activity def delete_later!(uri) redis.setex("delete_upon_arrival:#{@account.id}:#{uri}", 6.hours.seconds, uri) end + + def fetch_remote_original_status + if object_uri.start_with?('http') + return if ActivityPub::TagManager.instance.local_uri?(object_uri) + ActivityPub::FetchRemoteStatusService.new.call(object_uri, id: true, on_behalf_of: @account.followers.local.first) + elsif @object['url'].present? + ::FetchRemoteStatusService.new.call(@object['url']) + end + end end |