trabajo-afectivo/lib/sessions/event/chat_session_leave_temporary.rb
2022-01-01 14:38:12 +01:00

16 lines
389 B
Ruby

# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class Sessions::Event::ChatSessionLeaveTemporary < Sessions::Event::ChatBase
def run
return super if super
return if !check_chat_session_exists
chat_session = current_chat_session
ChatLeaveJob.set(wait: 0.5.minutes).perform_later(chat_session.id, @client_id, @session)
false
end
end