Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions src/InvitationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1809,12 +1809,25 @@ function getActiveParticipants(match, preview) {
const acceptedInvitees = uniqueAcceptedInvitees(inviteeSource);

if (!filteredParticipants.length && !acceptedInvitees.length) {
const fallback = filterDisplayableParticipants(participantSource);
if (fallback.length) {
return fallback;
}
return [];
}

return filterDisplayableParticipants(
const combined = filterDisplayableParticipants(
uniqueMatchOccupants(filteredParticipants, acceptedInvitees),
);

if (!combined.length) {
const fallback = filterDisplayableParticipants(participantSource);
if (fallback.length) {
return fallback;
}
}

return combined;
}

function getRosterParticipants(match, preview) {
Expand Down Expand Up @@ -1865,6 +1878,10 @@ function getRosterParticipants(match, preview) {
]);

if (!filteredParticipants.length && !acceptedInvitees.length) {
const fallback = filterDisplayableParticipants(participantSource);
if (fallback.length) {
return fallback;
}
return [];
}

Expand All @@ -1876,9 +1893,18 @@ function getRosterParticipants(match, preview) {
return filterDisplayableParticipants(acceptedInvitees);
}

return filterDisplayableParticipants(
const combined = filterDisplayableParticipants(
uniqueMatchOccupants(filteredParticipants, acceptedInvitees),
);

if (!combined.length) {
const fallback = filterDisplayableParticipants(participantSource);
if (fallback.length) {
return fallback;
}
}

return combined;
}

const OPEN_MATCH_PENDING_STATUS_VALUES = new Set([
Expand Down