mirror of
https://github.com/friendica/friendica
synced 2025-05-01 23:04:24 +02:00
Legacy DFRN transport layer is removed
This commit is contained in:
parent
fd37a57678
commit
3a5523820c
27 changed files with 199 additions and 3175 deletions
|
@ -811,13 +811,11 @@ class Contact
|
|||
}
|
||||
|
||||
$protocol = $contact['network'];
|
||||
if (($protocol == Protocol::DFRN) && !self::isLegacyDFRNContact($contact)) {
|
||||
$protocol = Protocol::ACTIVITYPUB;
|
||||
if (($protocol == Protocol::DFRN) && !empty($contact['protocol'])) {
|
||||
$protocol = $contact['protocol'];
|
||||
}
|
||||
|
||||
if (($protocol == Protocol::DFRN) && $dissolve) {
|
||||
DFRN::deliver($user, $contact, 'placeholder', true);
|
||||
} elseif (in_array($protocol, [Protocol::OSTATUS, Protocol::DFRN])) {
|
||||
if (in_array($protocol, [Protocol::OSTATUS, Protocol::DFRN])) {
|
||||
// create an unfollow slap
|
||||
$item = [];
|
||||
$item['verb'] = Activity::O_UNFOLLOW;
|
||||
|
@ -2273,18 +2271,6 @@ class Contact
|
|||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects if a given contact array belongs to a legacy DFRN connection
|
||||
*
|
||||
* @param array $contact
|
||||
* @return boolean
|
||||
*/
|
||||
public static function isLegacyDFRNContact($contact)
|
||||
{
|
||||
// Newer Friendica contacts are connected via AP, then these fields aren't set
|
||||
return !empty($contact['dfrn-id']) || !empty($contact['issued-id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects the communication protocol for a given contact url.
|
||||
* This is used to detect Friendica contacts that we can communicate via AP.
|
||||
|
@ -2387,24 +2373,6 @@ class Contact
|
|||
|
||||
$protocol = self::getProtocol($ret['url'], $ret['network']);
|
||||
|
||||
if (($protocol === Protocol::DFRN) && !DBA::isResult($contact)) {
|
||||
if ($interactive) {
|
||||
if (strlen(DI::baseUrl()->getUrlPath())) {
|
||||
$myaddr = bin2hex(DI::baseUrl() . '/profile/' . $user['nickname']);
|
||||
} else {
|
||||
$myaddr = bin2hex($user['nickname'] . '@' . DI::baseUrl()->getHostname());
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect($ret['request'] . "&addr=$myaddr");
|
||||
|
||||
// NOTREACHED
|
||||
}
|
||||
} elseif (DI::config()->get('system', 'dfrn_only') && ($ret['network'] != Protocol::DFRN)) {
|
||||
$result['message'] = DI::l10n()->t('This site is not configured to allow communications with other networks.') . EOL;
|
||||
$result['message'] .= DI::l10n()->t('No compatible communication protocols or feeds were discovered.') . EOL;
|
||||
return $result;
|
||||
}
|
||||
|
||||
// This extra param just confuses things, remove it
|
||||
if ($protocol === Protocol::DIASPORA) {
|
||||
$ret['url'] = str_replace('?absolute=true', '', $ret['url']);
|
||||
|
|
|
@ -38,7 +38,7 @@ class Conversation
|
|||
const PARCEL_SALMON = 3;
|
||||
const PARCEL_FEED = 4; // Deprecated
|
||||
const PARCEL_SPLIT_CONVERSATION = 6;
|
||||
const PARCEL_LEGACY_DFRN = 7;
|
||||
const PARCEL_LEGACY_DFRN = 7; // Deprecated
|
||||
const PARCEL_DIASPORA_DFRN = 8;
|
||||
const PARCEL_LOCAL_DFRN = 9;
|
||||
const PARCEL_DIRECT = 10;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue