<?php

namespace DC\ThreadThumbnail\XF\Pub\Controller;

use XF\Mvc\Entity\Entity;
use XF\Mvc\ParameterBag;

class Forum extends XFCP_Forum
{
    protected function finalizeThreadCreate(\XF\Service\Thread\Creator $creator)
    {
        parent::finalizeThreadCreate($creator);

        $thread = $creator->getThread();

        $thread->set('DC_ThreadThumbnail_tempThumbUrl', $thread->getThumbnailSmall());
        $thread->set('DC_ThreadThumbnail_tempImageUrl', $thread->getThumbnailFull());

        $thread->save();
    }
}