]> git.mxchange.org Git - friendica.git/commitdiff
Fix: Undefined array key "object_object_type"
authorMichael <heluecht@pirati.ca>
Mon, 3 Oct 2022 20:01:28 +0000 (20:01 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 3 Oct 2022 20:01:28 +0000 (20:01 +0000)
src/Protocol/ActivityPub/Receiver.php

index a410c352589830e483d2bb45349c58926c82a025..38ed993cf2a470d9e92a981ef1fe238dc9d7c763 100644 (file)
@@ -887,13 +887,13 @@ class Receiver
                                } elseif (($object_data['object_type'] == 'as:Block') &&
                                        in_array($object_data['object_object_type'], self::ACCOUNT_TYPES)) {
                                        ActivityPub\Processor::unblockAccount($object_data);
-                               } elseif (in_array($object_data['object_type'], array_merge(self::ACTIVITY_TYPES, ['as:Announce'])) &&
-                                       in_array($object_data['object_object_type'], array_merge(['as:Tombstone'], self::CONTENT_TYPES))) {
-                                       ActivityPub\Processor::undoActivity($object_data);
                                } elseif (in_array($object_data['object_type'], array_merge(self::ACTIVITY_TYPES, ['as:Announce', 'as:Create', ''])) &&
                                        empty($object_data['object_object_type'])) {
                                        // We cannot detect the target object. So we can ignore it.
                                        Queue::remove($object_data);
+                               } elseif (in_array($object_data['object_type'], array_merge(self::ACTIVITY_TYPES, ['as:Announce'])) &&
+                                       in_array($object_data['object_object_type'], array_merge(['as:Tombstone'], self::CONTENT_TYPES))) {
+                                       ActivityPub\Processor::undoActivity($object_data);
                                } elseif (in_array($object_data['object_type'], ['as:Create']) &&
                                        in_array($object_data['object_object_type'], ['pt:CacheFile'])) {
                                        // Unhandled Peertube activity