diff --git a/lhc_web/lib/core/lhchat/lhchatworkflow.php b/lhc_web/lib/core/lhchat/lhchatworkflow.php index 1e9166328b..693138c972 100644 --- a/lhc_web/lib/core/lhchat/lhchatworkflow.php +++ b/lhc_web/lib/core/lhchat/lhchatworkflow.php @@ -19,7 +19,7 @@ public static function timeoutWorkflow(erLhcoreClassModelChat & $chat) $msg->time = time(); \LiveHelperChat\Models\Departments\UserDepAlias::getAlias(array('scope' => 'msg', 'msg' => & $msg, 'chat' => & $chat)); - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $msg, 'chat' => & $chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true,'msg' => & $msg, 'chat' => & $chat)); $msg->saveThis(); diff --git a/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponder.php b/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponder.php index b52733f142..29b66b4c62 100644 --- a/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponder.php +++ b/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponder.php @@ -465,7 +465,7 @@ public function getMeta(& $chat, $type, $counter = null, $options = array()) // Dispatch event for a new messages foreach (erLhcoreClassModelmsg::getList(['filtergt' => ['id' => $last_msg_id], 'filter' => ['chat_id' => $chat->id]]) as $newMessage) { - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $newMessage, 'chat' => & $chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true, 'msg' => & $newMessage, 'chat' => & $chat)); } } else { diff --git a/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponderchat.php b/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponderchat.php index fa66b4d59c..a503855d91 100644 --- a/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponderchat.php +++ b/lhc_web/lib/models/lhabstract/erlhabstractmodelautoresponderchat.php @@ -149,7 +149,7 @@ public function process() $msg->time = time(); \LiveHelperChat\Models\Departments\UserDepAlias::getAlias(array('scope' => 'msg', 'msg' => & $msg, 'chat' => & $this->chat)); - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $msg, 'chat' => & $this->chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true, 'msg' => & $msg, 'chat' => & $this->chat)); $msg->saveThis(); @@ -203,7 +203,7 @@ public function process() $msg->time = time(); \LiveHelperChat\Models\Departments\UserDepAlias::getAlias(array('scope' => 'msg', 'msg' => & $msg, 'chat' => & $this->chat)); - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $msg, 'chat' => & $this->chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true,'msg' => & $msg, 'chat' => & $this->chat)); $msg->saveThis(); @@ -227,7 +227,7 @@ public function process() $msg->time = time(); \LiveHelperChat\Models\Departments\UserDepAlias::getAlias(array('scope' => 'msg', 'msg' => & $msg, 'chat' => & $this->chat)); - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $msg, 'chat' => & $this->chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true,'msg' => & $msg, 'chat' => & $this->chat)); $msg->saveThis(); @@ -264,7 +264,7 @@ public function process() $msg->time = time(); \LiveHelperChat\Models\Departments\UserDepAlias::getAlias(array('scope' => 'msg', 'msg' => & $msg, 'chat' => & $this->chat)); - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $msg, 'chat' => & $this->chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true,'msg' => & $msg, 'chat' => & $this->chat)); $msg->saveThis(); @@ -302,7 +302,7 @@ public function process() $msg->time = time(); \LiveHelperChat\Models\Departments\UserDepAlias::getAlias(array('scope' => 'msg', 'msg' => & $msg, 'chat' => & $this->chat)); - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $msg, 'chat' => & $this->chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true,'msg' => & $msg, 'chat' => & $this->chat)); $msg->saveThis(); @@ -346,7 +346,7 @@ public function process() $msg->time = time(); \LiveHelperChat\Models\Departments\UserDepAlias::getAlias(array('scope' => 'msg', 'msg' => & $msg, 'chat' => & $this->chat)); - erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('msg' => & $msg, 'chat' => & $this->chat)); + erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_auto_responder_msg_saved', array('ignore_times' => true,'msg' => & $msg, 'chat' => & $this->chat)); $msg->saveThis();