New constant for federated protocols

This commit is contained in:
Michael 2019-07-01 18:00:55 +00:00
parent 4bb7a8c342
commit 6041f74df6
14 changed files with 29 additions and 27 deletions

View file

@ -556,7 +556,7 @@ class Receiver
// Check if the potential receiver is following the actor
// Exception: The receiver is targetted via "to" or this is a comment
if ((($element != 'as:to') && empty($replyto)) || ($contact['contact-type'] == Contact::TYPE_COMMUNITY)) {
$networks = [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
$networks = Protocol::FEDERATED;
$condition = ['nurl' => Strings::normaliseLink($actor), 'rel' => [Contact::SHARING, Contact::FRIEND],
'network' => $networks, 'archive' => false, 'pending' => false, 'uid' => $contact['uid']];
@ -591,7 +591,7 @@ class Receiver
public static function getReceiverForActor($actor, $tags)
{
$receivers = [];
$networks = [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
$networks = Protocol::FEDERATED;
$condition = ['nurl' => Strings::normaliseLink($actor), 'rel' => [Contact::SHARING, Contact::FRIEND, Contact::FOLLOWER],
'network' => $networks, 'archive' => false, 'pending' => false];
$contacts = DBA::select('contact', ['uid', 'rel'], $condition);

View file

@ -358,7 +358,7 @@ class Transmitter
if (Config::get('debug', 'total_ap_delivery')) {
// Will be activated in a later step
$networks = [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
$networks = Protocol::FEDERATED;
} else {
// For now only send to these contacts:
$networks = [Protocol::ACTIVITYPUB, Protocol::OSTATUS];
@ -530,7 +530,7 @@ class Transmitter
if (Config::get('debug', 'total_ap_delivery')) {
// Will be activated in a later step
$networks = [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
$networks = Protocol::FEDERATED;
} else {
// For now only send to these contacts:
$networks = [Protocol::ACTIVITYPUB, Protocol::OSTATUS];