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

17 lines
388 B
Ruby
Raw Permalink Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
2015-12-05 19:55:34 +00:00
class Sessions::Event::ChatSessionLeaveTemporary < Sessions::Event::ChatBase
def run
2015-12-09 13:09:37 +00:00
return super if super
2015-12-05 19:55:34 +00:00
return if !check_chat_session_exists
2015-12-05 19:55:34 +00:00
chat_session = current_chat_session
ChatLeaveJob.set(wait: 0.5.minutes).perform_later(chat_session.id, @client_id, @session)
2015-12-05 19:55:34 +00:00
false
end
end