From 40bc43215d435c0d83e4787cd791961438a0d39b Mon Sep 17 00:00:00 2001 From: tenma Date: Tue, 31 Mar 2020 08:09:22 +0100 Subject: [PATCH] [OStatus] Update salmonaction to use the new LRDD's method for grabbing aliases --- plugins/OStatus/lib/salmonaction.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/OStatus/lib/salmonaction.php b/plugins/OStatus/lib/salmonaction.php index 4d2144c300..6cd1473a14 100644 --- a/plugins/OStatus/lib/salmonaction.php +++ b/plugins/OStatus/lib/salmonaction.php @@ -250,14 +250,11 @@ class SalmonAction extends Action // // Example: We have stored http://example.com/user/1 but this URI says https://example.com/user/1 common_debug('No local Profile object found for a magicsigned activity author URI: '.$e->object_uri); - $disco = new Discovery(); - $xrd = $disco->lookup($e->object_uri); + $all_ids = LRDDPlugin::grab_profile_aliases($e->object_uri); + // Step 1: We got a bunch of discovery data for https://example.com/user/1 which includes // aliases https://example.com/user and hopefully our original http://example.com/user/1 too - $all_ids = array_merge(array($xrd->subject), $xrd->aliases); - - if (!in_array($e->object_uri, $all_ids)) { - common_debug('The activity author URI we got was not listed itself when doing discovery on it.'); + if (is_null($all_ids)) { throw $e; }