mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:50:10 +00:00
Caching for scrape, keywords for remote_self, notifications for addresses that aren't in your contact list.
This commit is contained in:
parent
7d34648373
commit
184dcf75a7
7 changed files with 130 additions and 85 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue