Update ws client ids in reconnect.
This commit is contained in:
parent
f7edea8ce8
commit
61cb35c193
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,10 @@ class Sessions::Event::ChatStatusCustomer < Sessions::Event::ChatBase
|
||||||
session_id = nil
|
session_id = nil
|
||||||
if @data['data']['session_id']
|
if @data['data']['session_id']
|
||||||
session_id = @data['data']['session_id']
|
session_id = @data['data']['session_id']
|
||||||
|
|
||||||
|
# update recipients of existing sessions
|
||||||
|
chat_session = Chat::Session.find_by(session_id: session_id)
|
||||||
|
chat_session.add_recipient(@client_id, true)
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
event: 'chat_status_customer',
|
event: 'chat_status_customer',
|
||||||
|
|
Loading…
Reference in a new issue