X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2FOStatusPlugin.php;h=7c509f06418900d30bc9059ac15080f2f73e7c75;hb=5167b1fa408aa486ad75c8ddd3c71cb568dc84a3;hp=c3307f23cbcb021dec2378f4391a146ba59cbca5;hpb=0e91a38c9c8cbaec0d29c5762b8194d2044e848b;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index c3307f23cb..7c509f0641 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -1265,17 +1265,23 @@ class OStatusPlugin extends Plugin function onStartGetProfileFromURI($uri, &$profile) { // Don't want to do Web-based discovery on our own server, - // so we check locally first. + // so we check locally first. This duplicates the functionality + // in the Profile class, since the plugin always runs before + // that local lookup, but since we return false it won't run double. $user = User::getKV('uri', $uri); - - if (!empty($user)) { + if ($user instanceof User) { $profile = $user->getProfile(); return false; + } else { + $group = User_group::getKV('uri', $uri); + if ($group instanceof User_group) { + $profile = $group->getProfile(); + return false; + } } // Now, check remotely - try { $oprofile = Ostatus_profile::ensureProfileURI($uri); $profile = $oprofile->localProfile();