Caching for scrape, keywords for remote_self, notifications for addresses that aren't in your contact list.

This commit is contained in:
Michael Vogel 2015-01-20 22:54:25 +01:00
parent 7d34648373
commit 184dcf75a7
7 changed files with 130 additions and 85 deletions

View file

@ -343,6 +343,12 @@ function probe_url($url, $mode = PROBE_NORMAL) {
if(! $url)
return $result;
$result = Cache::get("probe_url:".$mode.":".$url);
if (!is_null($result)) {
$result = unserialize($result);
return $result;
}
$network = null;
$diaspora = false;
$diaspora_base = '';
@ -401,6 +407,9 @@ function probe_url($url, $mode = PROBE_NORMAL) {
$pubkey = $diaspora_key;
$diaspora = true;
}
if($link['@attributes']['rel'] === 'http://ostatus.org/schema/1.0/subscribe') {
$diaspora = false;
}
}
// Status.Net can have more than one profile URL. We need to match the profile URL
@ -759,5 +768,7 @@ function probe_url($url, $mode = PROBE_NORMAL) {
$result = $result2;
}
Cache::set("probe_url:".$mode.":".$url,serialize($result));
return $result;
}