mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-24 03:12:46 +01:00
In SendReplyToCustomer listener do not include messages added after the event has been fired - closes #2462
This commit is contained in:
parent
5271ba6fbf
commit
ac19634172
@ -35,6 +35,15 @@ class SendReplyToCustomer
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove threads added after this event had fired.
|
||||
foreach ($replies as $i => $reply) {
|
||||
if ($reply->id == $event->thread->id) {
|
||||
break;
|
||||
} else {
|
||||
$replies->forget($i);
|
||||
}
|
||||
}
|
||||
|
||||
// Chat conversation.
|
||||
if ($conversation->isChat()) {
|
||||
\Helper::backgroundAction('chat_conversation.send_reply', [$conversation, $replies, $conversation->customer], now()->addSeconds(Conversation::UNDO_TIMOUT));
|
||||
|
Loading…
Reference in New Issue
Block a user