Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Handle the new Session.logged_out event. Log the user out and display…
Browse files Browse the repository at this point in the history
… a message telling them they've been logged out.

Requires matrix-org/matrix-js-sdk#100 (but safe without)
Fixes element-hq/element-web#414
  • Loading branch information
dbkr committed Mar 15, 2016
1 parent 74bbb81 commit a1b875b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/structures/MatrixChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,16 @@ module.exports = React.createClass({
call: call
});
});
cli.on('Session.logged_out', function(call) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Logged Out",
description: "For security, this session has been logged out. Please log in again."
});
dis.dispatch({
action: 'logout'
});
});
Notifier.start();
UserActivity.start();
Presence.start();
Expand Down

0 comments on commit a1b875b

Please sign in to comment.