Handle profile-from-uri hook to return ostatus profile if there's a match
This commit is contained in:
parent
a2de30b767
commit
3baff9aa98
|
@ -995,4 +995,18 @@ class OStatusPlugin extends Plugin
|
||||||
$feed = $oprofile->feeduri;
|
$feed = $oprofile->feeduri;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onStartGetProfileFromURI($uri, &$profile) {
|
||||||
|
|
||||||
|
// XXX: do discovery here instead (OStatus_profile::ensureProfileURI($uri))
|
||||||
|
|
||||||
|
$oprofile = Ostatus_profile::staticGet('uri', $uri);
|
||||||
|
|
||||||
|
if (!empty($oprofile) && !$oprofile->isGroup()) {
|
||||||
|
$profile = $oprofile->localProfile();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user