mirror of
https://github.com/friendica/friendica
synced 2024-11-19 11:43: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)) {
|
if (!DBA::isResult($item)) {
|
||||||
Logger::warning('No existing item, item will be created', ['uri' => $activity['id']]);
|
Logger::warning('No existing item, item will be created', ['uri' => $activity['id']]);
|
||||||
$item = self::createItem($activity);
|
$item = self::createItem($activity);
|
||||||
|
if (empty($item)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self::postItem($activity, $item);
|
self::postItem($activity, $item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -416,6 +420,10 @@ class Processor
|
||||||
public static function createActivity($activity, $verb)
|
public static function createActivity($activity, $verb)
|
||||||
{
|
{
|
||||||
$item = self::createItem($activity);
|
$item = self::createItem($activity);
|
||||||
|
if (empty($item)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$item['verb'] = $verb;
|
$item['verb'] = $verb;
|
||||||
$item['thr-parent'] = $activity['object_id'];
|
$item['thr-parent'] = $activity['object_id'];
|
||||||
$item['gravity'] = GRAVITY_ACTIVITY;
|
$item['gravity'] = GRAVITY_ACTIVITY;
|
||||||
|
|
Loading…
Reference in a new issue