diff --git a/src/messenger/webim/operator/agent.php b/src/messenger/webim/operator/agent.php index 6aa95e86..53227251 100644 --- a/src/messenger/webim/operator/agent.php +++ b/src/messenger/webim/operator/agent.php @@ -40,6 +40,7 @@ if( !isset($_GET['token']) ) { $page = array( 'user' => topage($thread['userName']), 'agent' => topage($thread['agentName']), 'link' => $_SERVER['PHP_SELF']."?thread=$threadid&force=true" ); + start_html_output(); require('../view/confirm.php'); exit; } diff --git a/src/messenger/webim/thread.php b/src/messenger/webim/thread.php index 1b405a5d..182b84d6 100644 --- a/src/messenger/webim/thread.php +++ b/src/messenger/webim/thread.php @@ -59,6 +59,10 @@ if( $act == "refresh" ) { $kind = $isuser ? $kind_user : $kind_agent; $from = $isuser ? $thread['userName'] : $thread['agentName']; + if(!$isuser && $operator['operatorid'] != $thread['agentId']) { + show_error("cannot send"); + } + post_message($threadid,$kind,$message,$from, $isuser ? null : $operator['operatorid'] ); print_thread_messages($thread, $token, $lastid, $isuser, $outformat); exit;