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

Commit

Permalink
Don't lose invites when multiple are pending
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Feb 28, 2019
1 parent 872cdaa commit 805676a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stores/RoomListStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 805676a

Please sign in to comment.