mirror of
https://github.com/friendica/friendica
synced 2024-11-19 10:23:41 +00:00
Merge pull request #11369 from annando/empty-item
Prevent further processing of incoming posts when thay are rejected
This commit is contained in:
commit
2438eb78dd
1 changed files with 8 additions and 0 deletions
|
@ -164,6 +164,10 @@ class Processor
|
|||
if (!DBA::isResult($item)) {
|
||||
Logger::warning('No existing item, item will be created', ['uri' => $activity['id']]);
|
||||
$item = self::createItem($activity);
|
||||
if (empty($item)) {
|
||||
return;
|
||||
}
|
||||
|
||||
self::postItem($activity, $item);
|
||||
return;
|
||||
}
|
||||
|
@ -416,6 +420,10 @@ class Processor
|
|||
public static function createActivity($activity, $verb)
|
||||
{
|
||||
$item = self::createItem($activity);
|
||||
if (empty($item)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$item['verb'] = $verb;
|
||||
$item['thr-parent'] = $activity['object_id'];
|
||||
$item['gravity'] = GRAVITY_ACTIVITY;
|
||||
|
|
Loading…
Reference in a new issue