mirror of
https://github.com/friendica/friendica
synced 2025-05-14 21:44:10 +02:00
Ensure that pokes are always send only via DFRN
This commit is contained in:
parent
3b0fabcdb7
commit
44a49a8d7d
6 changed files with 23 additions and 11 deletions
|
@ -37,6 +37,7 @@ class APDelivery extends BaseObject
|
|||
} elseif ($cmd == Delivery::SUGGESTION) {
|
||||
$success = ActivityPub\Transmitter::sendContactSuggestion($uid, $inbox, $target_id);
|
||||
} elseif ($cmd == Delivery::RELOCATION) {
|
||||
} elseif ($cmd == Delivery::POKE) {
|
||||
} elseif ($cmd == Delivery::REMOVAL) {
|
||||
$success = ActivityPub\Transmitter::sendProfileDeletion($uid, $inbox);
|
||||
} elseif ($cmd == Delivery::PROFILEUPDATE) {
|
||||
|
|
|
@ -26,7 +26,9 @@ class Delivery extends BaseObject
|
|||
const RELOCATION = 'relocate';
|
||||
const DELETION = 'drop';
|
||||
const POST = 'wall-new';
|
||||
const POKE = 'poke';
|
||||
const COMMENT = 'comment-new';
|
||||
const ACTIVITY = 'activity-new';
|
||||
const REMOVAL = 'removeme';
|
||||
const PROFILEUPDATE = 'profileupdate';
|
||||
|
||||
|
|
|
@ -442,7 +442,7 @@ class Notifier
|
|||
}
|
||||
|
||||
if (in_array($rr['network'], [Protocol::DFRN, Protocol::DIASPORA]) && ($rr['protocol'] == Protocol::ACTIVITYPUB) &&
|
||||
!in_array($cmd, [Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION])) {
|
||||
!in_array($cmd, [Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION, Delivery::POKE])) {
|
||||
Logger::info('Contact is Friendica AP, so skipping delivery via legacy DFRN', ['url' => $rr['url']]);
|
||||
continue;
|
||||
}
|
||||
|
@ -482,7 +482,7 @@ class Notifier
|
|||
}
|
||||
|
||||
if (in_array($contact['network'], [Protocol::DFRN, Protocol::DIASPORA]) && ($contact['protocol'] == Protocol::ACTIVITYPUB) &&
|
||||
!in_array($cmd, [Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION])) {
|
||||
!in_array($cmd, [Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION, Delivery::POKE])) {
|
||||
Logger::info('Contact is Friendica AP, so skipping delivery via legacy DFRN', ['url' => $contact['url']]);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue