Distinct between leave and close status.

This commit is contained in:
Martin Edenhofer 2015-12-10 11:56:59 +01:00
parent a85c1f5e24
commit eb51b51ea4

View file

@ -252,12 +252,18 @@ class ChatWindow extends App.Controller
return if data.self_written return if data.self_written
@receiveMessage(data.message.content) @receiveMessage(data.message.content)
) )
@bind('chat_session_left chat_session_closed', (data) => @bind('chat_session_left', (data) =>
return if data.session_id isnt @session.session_id return if data.session_id isnt @session.session_id
return if data.self_written return if data.self_written
@addStatusMessage("<strong>#{data.realname}</strong> has left the conversation") @addStatusMessage("<strong>#{data.realname}</strong> has left the conversation")
@goOffline() @goOffline()
) )
@bind('chat_session_closed', (data) =>
return if data.session_id isnt @session.session_id
return if data.self_written
@addStatusMessage("<strong>#{data.realname}</strong> has closed the conversation")
@goOffline()
)
@bind('chat_focus', (data) => @bind('chat_focus', (data) =>
return if data.session_id isnt @session.session_id return if data.session_id isnt @session.session_id
@focus() @focus()