Merge remote-tracking branch 'upstream/develop' into dbstructure

This commit is contained in:
Michael 2020-05-11 18:54:19 +00:00
commit 57b4c70f9e
2 changed files with 5 additions and 4 deletions

View file

@ -68,13 +68,14 @@ class APDelivery
}
}
// This should never fail and is temporariy (until the move to )
// This should never fail and is temporariy (until the move to the "post" structure)
$item = Item::selectFirst(['uri-id'], ['id' => $target_id]);
$uriid = $item['uri-id'] ?? 0;
if (!$success && !Worker::defer() && in_array($cmd, [Delivery::POST])) {
Post\DeliveryData::incrementQueueFailed($item['uri-id']);
Post\DeliveryData::incrementQueueFailed($uriid);
} elseif ($success && in_array($cmd, [Delivery::POST])) {
Post\DeliveryData::incrementQueueDone($item['uri-id'], Post\DeliveryData::ACTIVITYPUB);
Post\DeliveryData::incrementQueueDone($uriid, Post\DeliveryData::ACTIVITYPUB);
}
}
}

View file

@ -936,7 +936,7 @@ return [
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
"notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["notify" => "id"], "comment" => ""],
"master-parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
"master-parent-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
"master-parent-uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Item-uri id of the parent of the related post"],
"parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
"receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
"comment" => "User id"],