From 04bfccc95fede08afddfc6fea3a565144ddcaff6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 25 Mar 2018 13:12:00 -0600 Subject: [PATCH] Consider the lack of membership event as not being in the room --- web/app/riot/riot-home/home.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/riot/riot-home/home.component.ts b/web/app/riot/riot-home/home.component.ts index ea699b2..7cb5e6d 100644 --- a/web/app/riot/riot-home/home.component.ts +++ b/web/app/riot/riot-home/home.component.ts @@ -237,7 +237,9 @@ export class RiotHomeComponent { if (integration.category === "bot") { const state = await this.scalar.getMembershipState(this.roomId, (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(() => {