2015-11-11 13:10:26 +00:00
|
|
|
class Sessions::Event::ChatBase
|
|
|
|
|
|
|
|
def initialize(data, session, client_id)
|
|
|
|
@data = data
|
|
|
|
@session = session
|
|
|
|
@client_id = client_id
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2015-11-11 20:44:54 +00:00
|
|
|
def pre
|
2015-11-11 13:10:26 +00:00
|
|
|
|
|
|
|
# check if feature is enabled
|
|
|
|
if !Setting.get('chat')
|
|
|
|
return {
|
|
|
|
event: 'chat_error',
|
|
|
|
data: {
|
|
|
|
state: 'chat_disabled',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2015-11-11 20:44:54 +00:00
|
|
|
def post
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2015-11-11 13:10:26 +00:00
|
|
|
end
|