Skip to content

Commit df9f1a8

Browse files
committed
Show current user in the recent section of attendee selector page
1 parent c025d13 commit df9f1a8

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/libs/OptionsListUtils.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,6 +2175,20 @@ function getAttendeeOptions(
21752175
'accountID',
21762176
);
21772177

2178+
const recentAttendeeHasCurrentUser = recentAttendees.find((attendee) => attendee.email === currentUserLogin || attendee.login === currentUserLogin);
2179+
if (!recentAttendeeHasCurrentUser && currentUserLogin) {
2180+
const details = getPersonalDetailByEmail(currentUserLogin);
2181+
recentAttendees.push({
2182+
email: currentUserLogin,
2183+
login: currentUserLogin,
2184+
displayName: details?.displayName ?? currentUserLogin,
2185+
accountID: currentUserAccountID,
2186+
text: details?.displayName ?? currentUserLogin,
2187+
searchText: details?.displayName ?? currentUserLogin,
2188+
avatarUrl: details?.avatarThumbnail ?? '',
2189+
});
2190+
}
2191+
21782192
const filteredRecentAttendees = recentAttendees
21792193
.filter((attendee) => !attendees.find(({email, displayName}) => (attendee.email ? email === attendee.email : displayName === attendee.displayName)))
21802194
.map((attendee) => ({

0 commit comments

Comments
 (0)