+ private function getChatSetting(Channel $channel, $name, $default = null) {
+ if (array_key_exists($name, $channel->chat_settings)) {
+ return $channel->chat_settings[$name];
+ }
+ return $default;
+ }
+
+ private function getNotes(Channel $channel) {
+ if (!isset($this->notes[$channel->id])) {
+ $this->notes[$channel->id] = [
+ 'last_read' => 0,
+ 'last_write' => time(),
+ 'read_since_last_write' => 0,
+ 'wait_msgs' => $this->randomWaitMsgs($channel),
+ 'wait_time' => $this->randomWaitTime($channel),
+ ];
+ }
+ return $this->notes[$channel->id];
+ }
+