Merge pull request #3065 from matrix-org/travis/fix-logout

Don't refresh custom status on logout
This commit is contained in:
Travis Ralston 2019-06-05 07:25:08 -06:00 committed by GitHub
commit 85858c731c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,6 +91,8 @@ module.exports = React.createClass({
}, },
_getStatusMessageUser() { _getStatusMessageUser() {
if (!MatrixClientPeg.get()) return null; // We've probably been logged out
const selfId = MatrixClientPeg.get().getUserId(); const selfId = MatrixClientPeg.get().getUserId();
const otherMember = this.props.room.currentState.getMembersExcept([selfId])[0]; const otherMember = this.props.room.currentState.getMembersExcept([selfId])[0];
if (!otherMember) { if (!otherMember) {