spelling: announce

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2023-03-21 23:16:47 -04:00
parent abbea6f002
commit e69ae13880
2 changed files with 8 additions and 8 deletions

View file

@ -946,7 +946,7 @@ class Processor
return true; return true;
} }
if (in_array($activity['completion-mode'] ?? Receiver::COMPLETION_NONE, [Receiver::COMPLETION_MANUAL, Receiver::COMPLETION_ANNOUCE])) { if (in_array($activity['completion-mode'] ?? Receiver::COMPLETION_NONE, [Receiver::COMPLETION_MANUAL, Receiver::COMPLETION_ANNOUNCE])) {
// Manual completions and completions caused by reshares are allowed without any further checks. // Manual completions and completions caused by reshares are allowed without any further checks.
Logger::debug('Message is in completion mode - accepted', ['mode' => $activity['completion-mode'], 'uri-id' => $item['uri-id'], 'guid' => $item['guid'], 'url' => $item['uri']]); Logger::debug('Message is in completion mode - accepted', ['mode' => $activity['completion-mode'], 'uri-id' => $item['uri-id'], 'guid' => $item['guid'], 'url' => $item['uri']]);
return true; return true;

View file

@ -74,11 +74,11 @@ class Receiver
const TARGET_ANSWER = 6; const TARGET_ANSWER = 6;
const TARGET_GLOBAL = 7; const TARGET_GLOBAL = 7;
const COMPLETION_NONE = 0; const COMPLETION_NONE = 0;
const COMPLETION_ANNOUCE = 1; const COMPLETION_ANNOUNCE = 1;
const COMPLETION_RELAY = 2; const COMPLETION_RELAY = 2;
const COMPLETION_MANUAL = 3; const COMPLETION_MANUAL = 3;
const COMPLETION_AUTO = 4; const COMPLETION_AUTO = 4;
/** /**
* Checks incoming message from the inbox * Checks incoming message from the inbox
@ -643,7 +643,7 @@ class Receiver
} }
} }
$decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUCE]); $decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUNCE]);
if ($decouple && ($trust_source || DI::config()->get('debug', 'ap_inbox_store_untrusted'))) { if ($decouple && ($trust_source || DI::config()->get('debug', 'ap_inbox_store_untrusted'))) {
$object_data = Queue::add($object_data, $type, $uid, $http_signer, $push, $trust_source); $object_data = Queue::add($object_data, $type, $uid, $http_signer, $push, $trust_source);
@ -731,7 +731,7 @@ class Receiver
case 'as:Announce': case 'as:Announce':
if (in_array($object_data['object_type'], self::CONTENT_TYPES)) { if (in_array($object_data['object_type'], self::CONTENT_TYPES)) {
if (!Item::searchByLink($object_data['object_id'], $uid)) { if (!Item::searchByLink($object_data['object_id'], $uid)) {
if (ActivityPub\Processor::fetchMissingActivity($object_data['object_id'], [], $object_data['actor'], self::COMPLETION_ANNOUCE, $uid)) { if (ActivityPub\Processor::fetchMissingActivity($object_data['object_id'], [], $object_data['actor'], self::COMPLETION_ANNOUNCE, $uid)) {
Logger::debug('Created announced id', ['uid' => $uid, 'id' => $object_data['object_id']]); Logger::debug('Created announced id', ['uid' => $uid, 'id' => $object_data['object_id']]);
Queue::remove($object_data); Queue::remove($object_data);
} else { } else {