X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FChatLog.php;h=063e8036485cdf5cc31ef793215db38f63a90b4c;hb=7d1ef8619d7513184340f73e99efa20481b86d75;hp=c28a0724685320254e122e3e727a5755a56134b6;hpb=bfc45b40d539431e465210e3ecf11367a42626ee;p=alttp.git diff --git a/app/Models/ChatLog.php b/app/Models/ChatLog.php index c28a072..063e803 100644 --- a/app/Models/ChatLog.php +++ b/app/Models/ChatLog.php @@ -106,6 +106,9 @@ class ChatLog extends Model { $channel = Channel::firstWhere('twitch_chat', '=', $cname); if (!is_null($channel)) { $this->channel()->associate($channel); + if (empty($this->twitch_category) && now()->sub(15, 'minute')->isBefore($this->created_at)) { + $this->twitch_category = $channel->twitch_category; + } } }