mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:05:19 +02:00
Replace "Probe::uri" with "Contact::getByURL"
This commit is contained in:
parent
c352af8eda
commit
d6bf7f2cda
7 changed files with 18 additions and 20 deletions
|
@ -294,7 +294,7 @@ function dfrn_request_post(App $a)
|
|||
$hcard = '';
|
||||
|
||||
// Detect the network
|
||||
$data = Probe::uri($url);
|
||||
$data = Contact::getByURL($url);
|
||||
$network = $data["network"];
|
||||
|
||||
// Canonicalize email-style profile locator
|
||||
|
|
|
@ -23,7 +23,6 @@ use Friendica\App;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
function ostatus_subscribe_content(App $a)
|
||||
|
@ -47,7 +46,7 @@ function ostatus_subscribe_content(App $a)
|
|||
return $o . DI::l10n()->t('No contact provided.');
|
||||
}
|
||||
|
||||
$contact = Probe::uri($_REQUEST['url']);
|
||||
$contact = Contact::getByURL($_REQUEST['url']);
|
||||
if (!$contact) {
|
||||
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact');
|
||||
return $o . DI::l10n()->t('Couldn\'t fetch information for contact.');
|
||||
|
@ -88,7 +87,7 @@ function ostatus_subscribe_content(App $a)
|
|||
|
||||
$o .= '<p>' . $counter . '/' . $total . ': ' . $url;
|
||||
|
||||
$probed = Probe::uri($url);
|
||||
$probed = Contact::getByURL($url);
|
||||
if ($probed['network'] == Protocol::OSTATUS) {
|
||||
$result = Contact::createFromProbe($a->user, $probed['url'], true, Protocol::OSTATUS);
|
||||
if ($result['success']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue