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

Commit

Permalink
fix error/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Jul 25, 2018
1 parent d87d340 commit cfd20c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/stores/RoomListStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,13 @@ class RoomListStore extends Store {
if (!this._matrixClient) return;

this._matrixClient.getRooms().forEach((room, index) => {
const membership = room.getMyMembership(this._matrixClient.getUserId());
const myUserId = this._matrixClient.getUserId();
const membership = room.getMyMembership(myUserId);
const me = room.getMember(myUserId);

if (membership == "invite") {
lists["im.vector.fake.invite"].push(room);
} else if (membership == "join" || membership === "ban" || me.isKicked()) {
} else if (membership == "join" || membership === "ban" || (me && me.isKicked())) {
// Used to split rooms via tags
let tagNames = Object.keys(room.tags);

Expand Down

0 comments on commit cfd20c7

Please sign in to comment.