Revert "Removed not longer needed checks."
This reverts commit 76a130ac96
.
This commit is contained in:
parent
83baddb8b0
commit
47b38e1dfb
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@ class Chat < ApplicationModel
|
|||
store :preferences
|
||||
|
||||
def customer_state(session_id = nil)
|
||||
return { state: 'chat_disabled' } if !Setting.get('chat')
|
||||
|
||||
# reconnect
|
||||
if session_id
|
||||
|
@ -62,6 +63,7 @@ class Chat < ApplicationModel
|
|||
end
|
||||
|
||||
def self.agent_state(user_id)
|
||||
return { state: 'chat_disabled' } if !Setting.get('chat')
|
||||
assets = {}
|
||||
Chat.where(active: true).each {|chat|
|
||||
assets = chat.assets(assets)
|
||||
|
|
Loading…
Reference in a new issue