Skip to content
Merged
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
7 changes: 6 additions & 1 deletion src/pages/RoomMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,13 @@ function RoomMembersPage({report, session, policies}: RoomMembersPageProps) {

participants.forEach((accountID) => {
const details = personalDetails[accountID];
// When adding a new member to a room (whose personal detail does not exist in Onyx), an optimistic personal detail
// is created. However, when the real personal detail is returned from the backend, a duplicate member may appear
// briefly before the optimistic personal detail is deleted. To address this, we filter out the optimistically created
// member here.
const isDuplicateOptimisticDetail = details?.isOptimisticPersonalDetail && participants.some((accID) => accID !== accountID && details.login === personalDetails[accID]?.login);

if (!details) {
if (!details || isDuplicateOptimisticDetail) {
Log.hmmm(`[RoomMembersPage] no personal details found for room member with accountID: ${accountID}`);
return;
}
Expand Down