Commit 64e7e54397805a7b4374e883a1d042b0b7bdbf7d

Authored by Rodrigo Souto
1 parent 1d65a643

chat: ensure user logged in before register chat_status offline

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/controllers/public/account_controller.rb
... ... @@ -156,8 +156,8 @@ class AccountController < ApplicationController
156 156 def logout
157 157 if logged_in?
158 158 self.current_user.forget_me
  159 + current_user.update({:chat_status_at => DateTime.now}.merge({:last_chat_status => current_user.chat_status, :chat_status => 'offline'}))
159 160 end
160   - current_user.update({:chat_status_at => DateTime.now}.merge({:last_chat_status => current_user.chat_status, :chat_status => 'offline'}))
161 161 reset_session
162 162 session[:notice] = _("You have been logged out.")
163 163 redirect_to :controller => 'home', :action => 'index'
... ...