From 805676a511704baadc6f20ae886495d95bb2c2ae Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 28 Feb 2019 14:02:39 -0700 Subject: [PATCH] Don't lose invites when multiple are pending --- src/stores/RoomListStore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stores/RoomListStore.js b/src/stores/RoomListStore.js index a4138fcf01..e9ac33b506 100644 --- a/src/stores/RoomListStore.js +++ b/src/stores/RoomListStore.js @@ -477,7 +477,9 @@ class RoomListStore extends Store { room, category, this._state.lists[key], listsClone[key], lastTimestamp); if (!pushedEntry) { - if (listsClone[key].length === 0) { + // Special case invites: they don't really have timelines and can easily get lost when + // the user has multiple pending invites. Pushing them is the least worst option. + if (listsClone[key].length === 0 || key === "im.vector.fake.invite") { listsClone[key].push({room, category}); insertedIntoTags.push(key); } else {