]> git.localhorst.tv Git - alttp.git/commitdiff
exclude horstie and localhorst chats from other channels
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 13 Nov 2024 11:07:31 +0000 (12:07 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 13 Nov 2024 11:07:31 +0000 (12:07 +0100)
this is to prevent drawing game strings from appearing as random chats

app/Models/Channel.php

index 72c3e5e3902a77c20b69d0079ea77064498a3bb4..b4f0c118ba6c02bf19bca75c056239717d327962 100644 (file)
@@ -56,6 +56,8 @@ class Channel extends Model {
                $source = $this->getChatSetting('source', 'any');
                if (in_array($source, ['catchan', 'chan'])) {
                        $query->where('channel_id', $this->id);
+               } else if ($this->twitch_chat != '#horstiebot') {
+                       $query->whereNotIn('channel_id', [52, 53]);
                }
                if (in_array($source, ['cat', 'catchan'])) {
                        $query->where('twitch_category', $this->twitch_category);