public static function unreadInformWorkflow($options = array(), &$chat)
{
$chat->unread_messages_informed = 1;
$chat->updateThis();
if (in_array('mail', $options['options'])) {
erLhcoreClassChatMail::sendMailUnacceptedChat($chat, 7);
}
if (in_array('xmp', $options['options'])) {
$errors = array();
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('xml.before_send_xmp_message', array('chat' => &$chat, 'errors' => &$errors));
if (empty($errors)) {
erLhcoreClassXMP::sendXMPMessage($chat);
}
}
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.chat_unread_message', array('chat' => &$chat));
// Execute callback if it exists
$extensions = erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'extensions');
$instance = erLhcoreClassSystem::instance();
foreach ($extensions as $ext) {
$callbackFile = $instance->SiteDir . '/extension/' . $ext . '/callbacks/unread_message_chat.php';
if (file_exists($callbackFile)) {
include $callbackFile;
}
}
}