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

17 lines
389 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://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