trabajo-afectivo/lib/sessions/event/chat_base.rb

30 lines
395 B
Ruby
Raw Normal View History

class Sessions::Event::ChatBase
def initialize(data, session, client_id)
@data = data
@session = session
@client_id = client_id
end
def pre
# check if feature is enabled
if !Setting.get('chat')
return {
event: 'chat_error',
data: {
state: 'chat_disabled',
},
}
end
false
end
def post
false
end
end