1
1
Fork 0

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;
}
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.
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;

View file

@ -74,11 +74,11 @@ class Receiver
const TARGET_ANSWER = 6;
const TARGET_GLOBAL = 7;
const COMPLETION_NONE = 0;
const COMPLETION_ANNOUCE = 1;
const COMPLETION_RELAY = 2;
const COMPLETION_MANUAL = 3;
const COMPLETION_AUTO = 4;
const COMPLETION_NONE = 0;
const COMPLETION_ANNOUNCE = 1;
const COMPLETION_RELAY = 2;
const COMPLETION_MANUAL = 3;
const COMPLETION_AUTO = 4;
/**
* 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'))) {
$object_data = Queue::add($object_data, $type, $uid, $http_signer, $push, $trust_source);
@ -731,7 +731,7 @@ class Receiver
case 'as:Announce':
if (in_array($object_data['object_type'], self::CONTENT_TYPES)) {
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']]);
Queue::remove($object_data);
} else {