]> git.mxchange.org Git - friendica.git/commitdiff
spelling: announce
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Wed, 22 Mar 2023 03:16:47 +0000 (23:16 -0400)
committerJosh Soref <2119212+jsoref@users.noreply.github.com>
Sun, 26 Mar 2023 20:03:22 +0000 (16:03 -0400)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Receiver.php

index 42ff0ee12dad34f4fd5c6268f39a4dbd94636469..d6dc834fc01393851cd43bdd571110f9c35b2e5d 100644 (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;
index b1de036fd6503b9fcdbf792d751b2a5676cd34be..f246a9f94b13d3c316cf030ab7bd2c5d10981338 100644 (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 {