Consider the lack of membership event as not being in the room

This commit is contained in:
Travis Ralston 2018-03-25 13:12:00 -06:00
parent d4166477f0
commit 04bfccc95f

View File

@ -237,7 +237,9 @@ export class RiotHomeComponent {
if (integration.category === "bot") {
const state = await this.scalar.getMembershipState(this.roomId, (<FE_SimpleBot>integration).userId);
integration._inRoom = ["join", "invite"].indexOf(state.response.membership) !== -1;
if (state && state.response && state.response.membership) {
integration._inRoom = ["join", "invite"].indexOf(state.response.membership) !== -1;
} else integration._inRoom = false;
}
return Promise.all(promises).then(() => {