X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDelayedPublish.php;h=08bca828510fc8034f44c55a011a5b48999a2eb4;hb=34030a736d5e0aa2195c0f472cf69f863c161d83;hp=3dad5404811d8fd32570090b1016021fe7329bb5;hpb=6e06e0cf202e85ad28f49f69b6bf7e7a6ccd79d6;p=friendica.git diff --git a/src/Worker/DelayedPublish.php b/src/Worker/DelayedPublish.php index 3dad540481..08bca82851 100644 --- a/src/Worker/DelayedPublish.php +++ b/src/Worker/DelayedPublish.php @@ -1,6 +1,6 @@ $id, 'uid' => $item['uid'], 'cid' => $item['contact-id']]); - - if (!empty($id) && (!empty($taglist) || !empty($attachments))) { - $feeditem = Item::selectFirst(['uri-id'], ['id' => $id]); - foreach ($taglist as $tag) { - Tag::store($feeditem['uri-id'], Tag::HASHTAG, $tag); - } - foreach ($attachments as $attachment) { - $attachment['uri-id'] = $feeditem['uri-id']; - Post\Media::insert($attachment); - } - } - + $id = Post\Delayed::publish($item, $notify, $taglist, $attachments, $preparation_mode, $uri); + Logger::notice('Post published', ['id' => $id, 'uid' => $item['uid'], 'notify' => $notify, 'unprepared' => $preparation_mode]); } }