+ Logger::notice('No object id found', ['type' => $type, 'object_type' => $object_type, 'actor' => $actor, 'activity' => $activity]);
+ return;
+ }
+
+ $handle = ($type == 'as:Announce');
+
+ if (!$handle && in_array($type, ['as:Create', 'as:Update'])) {
+ $handle = in_array($object_type, self::CONTENT_TYPES);
+ }
+
+ if (!$handle) {
+ $trust_source = false;
+ $object_data = self::prepareObjectData($activity, 0, false, $trust_source);
+
+ if (!$trust_source) {
+ Logger::notice('Activity trust could not be achieved.', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor, 'activity' => $activity]);
+ return;
+ }
+
+ if (empty($object_data)) {
+ Logger::notice('No object data found', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor, 'activity' => $activity]);
+ return;
+ }
+
+ if (self::routeActivities($object_data, $type, true)) {
+ Logger::debug('Handled activity', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor]);
+ } else {
+ Logger::info('Unhandled activity', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor, 'activity' => $activity]);
+ }