// don't immediately respond if we crossed the msg threshold last
return;
}
+ if ($this->getLatestMessage($channel)->classify() == 'question' && $this->shouldAdlib($channel)) {
+ $this->performAdlib($channel);
+ return;
+ }
$text = $this->contextualMsg($channel);
if (!$text && $this->shouldAdlib($channel)) {
$this->performAdlib($channel);
$this->notes[$channel->id]['last_special'][$classification] = time();
}
- private function getLatestMessage(Channel $channel) {
+ private function getLatestMessage(Channel $channel): TokenizedMessage {
$notes = $this->getNotes($channel);
if (!empty($notes['latest_msgs'])) {
return $notes['latest_msgs'][count($notes['latest_msgs']) - 1];