mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 16:24:43 +03:00
Operators can post messages only to own threads
This commit is contained in:
parent
5a2e48eeef
commit
6a17db4e04
@ -392,8 +392,8 @@ class ThreadProcessor extends ClientSideProcessor implements
|
|||||||
} else {
|
} else {
|
||||||
$is_typing = abs($thread->lastPingUser - time()) < Settings::get('connection_timeout')
|
$is_typing = abs($thread->lastPingUser - time()) < Settings::get('connection_timeout')
|
||||||
&& $thread->userTyping;
|
&& $thread->userTyping;
|
||||||
// Operators can always post messages.
|
// Operators can post messages only to own threads.
|
||||||
$can_post = true;
|
$can_post = ($operator['operatorid'] == $thread->agentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
@ -462,8 +462,8 @@ class ThreadProcessor extends ClientSideProcessor implements
|
|||||||
// Get operator's array
|
// Get operator's array
|
||||||
if (!$args['user']) {
|
if (!$args['user']) {
|
||||||
$operator = $this->checkOperator();
|
$operator = $this->checkOperator();
|
||||||
// Operators can always post messages.
|
// Operators can post messages only to own threads.
|
||||||
$can_post = true;
|
$can_post = ($operator['operatorid'] == $thread->agentId);
|
||||||
} else {
|
} else {
|
||||||
// Users can post messages only when a thread is open.
|
// Users can post messages only when a thread is open.
|
||||||
$can_post = $thread->state != Thread::STATE_CLOSED;
|
$can_post = $thread->state != Thread::STATE_CLOSED;
|
||||||
|
Loading…
Reference in New Issue
Block a user