Removed not longer needed checks.

This commit is contained in:
Martin Edenhofer 2015-11-26 10:50:23 +01:00
parent bcde9a3695
commit 76a130ac96

View file

@ -5,7 +5,6 @@ class Chat < ApplicationModel
store :preferences
def customer_state(session_id = nil)
return { state: 'chat_disabled' } if !Setting.get('chat')
# reconnect
if session_id
@ -63,7 +62,6 @@ 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)