public static function chatAcceptedWorkflow($options = array(), &$chat)
{
if (in_array('mail_accepted', $options['options'])) {
erLhcoreClassChatMail::sendMailUnacceptedChat($chat, 9);
}
if (in_array('xmp_accepted', $options['options'])) {
$errors = array();
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('xml.before_send_xmp_message', array('chat' => &$chat, 'errors' => &$errors));
if (empty($errors)) {
erLhcoreClassXMP::sendXMPMessage($chat, array('template' => 'xmp_accepted_message', 'recipients_setting' => 'xmp_users_accepted'));
}
}
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.chat_accepted', array('chat' => &$chat));
}