Skip to content

Commit

Permalink
FIX: do not request refresh on 'log out all' request
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitjalan committed Jul 19, 2019
1 parent 30c4915 commit 2f6ce29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Expand Up @@ -1224,12 +1224,12 @@ def revoke_auth_token
# The user should not be able to revoke the auth token of current session.
raise Discourse::InvalidParameters.new(:token_id) if guardian.auth_token == token.auth_token
UserAuthToken.where(id: params[:token_id], user_id: user.id).each(&:destroy!)

MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]
else
UserAuthToken.where(user_id: user.id).each(&:destroy!)
end

MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]

render json: success_json
end

Expand Down

0 comments on commit 2f6ce29

Please sign in to comment.