+ // Fetch the activity on Lemmy "Announce" messages (announces of activities)
+ if (($type == 'as:Announce') && in_array($object_type, array_merge(self::ACTIVITY_TYPES, ['as:Delete', 'as:Undo', 'as:Update']))) {
+ $data = ActivityPub::fetchContent($object_id, $uid);
+ if (!empty($data)) {
+ $type = $object_type;
+ $activity = JsonLD::compact($data);
+
+ // Some variables need to be refetched since the activity changed
+ $actor = JsonLD::fetchElement($activity, 'as:actor', '@id');
+ $object_id = JsonLD::fetchElement($activity, 'as:object', '@id');
+ $object_type = self::fetchObjectType($activity, $object_id, $uid);
+ }
+ }
+
+ // Any activities on account types must not be altered
+ if (in_array($object_type, self::ACCOUNT_TYPES)) {
+ $object_data = [];
+ $object_data['id'] = JsonLD::fetchElement($activity, '@id');
+ $object_data['object_id'] = JsonLD::fetchElement($activity, 'as:object', '@id');
+ $object_data['object_actor'] = JsonLD::fetchElement($activity['as:object'], 'as:actor', '@id');
+ $object_data['object_object'] = JsonLD::fetchElement($activity['as:object'], 'as:object');
+ $object_data['object_type'] = JsonLD::fetchElement($activity['as:object'], '@type');
+ $object_data['push'] = $push;
+ } elseif (in_array($type, ['as:Create', 'as:Update', 'as:Announce']) || strpos($type, '#emojiReaction')) {