mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
Remove the activity
This commit is contained in:
parent
9fe70af85a
commit
99284222c1
1 changed files with 6 additions and 0 deletions
|
@ -1715,11 +1715,13 @@ class Processor
|
||||||
{
|
{
|
||||||
if (empty($activity['object_id']) || empty($activity['actor'])) {
|
if (empty($activity['object_id']) || empty($activity['actor'])) {
|
||||||
Logger::info('Empty object id or actor.');
|
Logger::info('Empty object id or actor.');
|
||||||
|
Queue::remove($activity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activity['object_id'] != $activity['actor']) {
|
if ($activity['object_id'] != $activity['actor']) {
|
||||||
Logger::info('Object id does not match actor.');
|
Logger::info('Object id does not match actor.');
|
||||||
|
Queue::remove($activity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1743,17 +1745,20 @@ class Processor
|
||||||
public static function movePerson(array $activity)
|
public static function movePerson(array $activity)
|
||||||
{
|
{
|
||||||
if (empty($activity['target_id']) || empty($activity['object_id'])) {
|
if (empty($activity['target_id']) || empty($activity['object_id'])) {
|
||||||
|
Queue::remove($activity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activity['object_id'] != $activity['actor']) {
|
if ($activity['object_id'] != $activity['actor']) {
|
||||||
Logger::notice('Object is not the actor', ['activity' => $activity]);
|
Logger::notice('Object is not the actor', ['activity' => $activity]);
|
||||||
|
Queue::remove($activity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$from = Contact::getByURL($activity['object_id'], false, ['uri-id']);
|
$from = Contact::getByURL($activity['object_id'], false, ['uri-id']);
|
||||||
if (empty($from['uri-id'])) {
|
if (empty($from['uri-id'])) {
|
||||||
Logger::info('Object not found', ['activity' => $activity]);
|
Logger::info('Object not found', ['activity' => $activity]);
|
||||||
|
Queue::remove($activity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1763,6 +1768,7 @@ class Processor
|
||||||
Logger::debug('Follower added', ['from' => $from_contact, 'result' => $result]);
|
Logger::debug('Follower added', ['from' => $from_contact, 'result' => $result]);
|
||||||
}
|
}
|
||||||
DBA::close($contacts);
|
DBA::close($contacts);
|
||||||
|
Queue::remove($activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue