Issue 11800: Remove entry from queue in any case.
This commit is contained in:
parent
da48453931
commit
f6d11e8401
1 changed files with 7 additions and 13 deletions
|
@ -215,14 +215,13 @@ class Processor
|
||||||
$item['edited'] = DateTimeFormat::utc($activity['updated']);
|
$item['edited'] = DateTimeFormat::utc($activity['updated']);
|
||||||
|
|
||||||
$item = self::processContent($activity, $item);
|
$item = self::processContent($activity, $item);
|
||||||
|
|
||||||
self::storeAttachments($activity, $item);
|
|
||||||
self::storeQuestion($activity, $item);
|
|
||||||
|
|
||||||
if (empty($item)) {
|
if (empty($item)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self::storeAttachments($activity, $item);
|
||||||
|
self::storeQuestion($activity, $item);
|
||||||
|
|
||||||
Post\History::add($item['uri-id'], $item);
|
Post\History::add($item['uri-id'], $item);
|
||||||
Item::update($item, ['uri' => $activity['id']]);
|
Item::update($item, ['uri' => $activity['id']]);
|
||||||
|
|
||||||
|
@ -919,7 +918,7 @@ class Processor
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($item['isForum'] ?? false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT) && !Contact::isSharingByURL($activity['author'], $receiver)) {
|
if (!($item['isForum'] ?? false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT) && !Contact::isSharingByURL($activity['author'] ?? '', $receiver)) {
|
||||||
if ($item['post-reason'] == Item::PR_BCC) {
|
if ($item['post-reason'] == Item::PR_BCC) {
|
||||||
Logger::info('Top level post via BCC from a non sharer, ignoring', ['uid' => $receiver, 'contact' => $item['contact-id']]);
|
Logger::info('Top level post via BCC from a non sharer, ignoring', ['uid' => $receiver, 'contact' => $item['contact-id']]);
|
||||||
continue;
|
continue;
|
||||||
|
@ -972,9 +971,6 @@ class Processor
|
||||||
$success = true;
|
$success = true;
|
||||||
} else {
|
} else {
|
||||||
Logger::notice('Item insertion aborted', ['uri' => $item['uri'], 'uid' => $item['uid']]);
|
Logger::notice('Item insertion aborted', ['uri' => $item['uri'], 'uid' => $item['uid']]);
|
||||||
if (Item::isTooOld($item) || !Item::isValid($item)) {
|
|
||||||
Queue::remove($activity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['uid'] == 0) {
|
if ($item['uid'] == 0) {
|
||||||
|
@ -982,13 +978,11 @@ class Processor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($success) {
|
|
||||||
Queue::remove($activity);
|
Queue::remove($activity);
|
||||||
|
|
||||||
if (Queue::hasChildren($item['uri'])) {
|
if ($success && Queue::hasChildren($item['uri'])) {
|
||||||
Worker::add(PRIORITY_HIGH, 'ProcessReplyByUri', $item['uri']);
|
Worker::add(PRIORITY_HIGH, 'ProcessReplyByUri', $item['uri']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Store send a follow request for every reshare - but only when the item had been stored
|
// Store send a follow request for every reshare - but only when the item had been stored
|
||||||
if ($stored && ($item['private'] != Item::PRIVATE) && ($item['gravity'] == GRAVITY_PARENT) && !empty($item['author-link']) && ($item['author-link'] != $item['owner-link'])) {
|
if ($stored && ($item['private'] != Item::PRIVATE) && ($item['gravity'] == GRAVITY_PARENT) && !empty($item['author-link']) && ($item['author-link'] != $item['owner-link'])) {
|
||||||
|
|
Loading…
Reference in a new issue