-
- if (!empty($sender_uid)) {
- $post = Post::selectFirst(['id'], ['uri-id' => $post_uriid, 'uid' => $sender_uid]);
- if (!DBA::isResult($post)) {
- Logger::warning('Post not found', ['uri-id' => $post_uriid, 'uid' => $sender_uid]);
- return;
- }
- $target_id = $post['id'];
- } elseif (!in_array($cmd, [Delivery::MAIL, Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION])) {
- $post = Post::selectFirst(['id', 'uid', 'uri-id'], ['item-id' => $post_uriid]);
- if (DBA::isResult($post)) {
- $target_id = $post['id'];
- $sender_uid = $post['uid'];
- $post_uriid = $post['uri-id'];
- }
- }
-