+ $source = $this->getChatSetting('source', 'any');
+ if (in_array($source, ['catchan', 'chan'])) {
+ $query->where('channel_id', $this->id);
+ }
+ if (in_array($source, ['cat', 'catchan'])) {
+ $query->where('twitch_category', $this->twitch_category);
+ }
+ return $query;