File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2175,20 +2175,6 @@ 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-
21922178 const filteredRecentAttendees = recentAttendees
21932179 . filter ( ( attendee ) => ! attendees . find ( ( { email, displayName} ) => ( attendee . email ? email === attendee . email : displayName === attendee . displayName ) ) )
21942180 . map ( ( attendee ) => ( {
Original file line number Diff line number Diff line change @@ -728,21 +728,7 @@ function getMerchantOrDescription(transaction: OnyxEntry<Transaction>) {
728728 * Return the list of modified attendees if present otherwise list of attendees
729729 */
730730function getAttendees ( transaction : OnyxInputOrEntry < Transaction > ) : Attendee [ ] {
731- const attendees = transaction ?. modifiedAttendees ? transaction . modifiedAttendees : ( transaction ?. comment ?. attendees ?? [ ] ) ;
732- if ( attendees . length === 0 ) {
733- const details = getPersonalDetailByEmail ( currentUserEmail ) ;
734- attendees . push ( {
735- email : currentUserEmail ,
736- login : details ?. login ?? currentUserEmail ,
737- displayName : details ?. displayName ?? currentUserEmail ,
738- accountID : currentUserAccountID ,
739- text : details ?. displayName ?? currentUserEmail ,
740- searchText : details ?. displayName ?? currentUserEmail ,
741- avatarUrl : details ?. avatarThumbnail ?? '' ,
742- selected : true ,
743- } ) ;
744- }
745- return attendees ;
731+ return transaction ?. modifiedAttendees ? transaction . modifiedAttendees : ( transaction ?. comment ?. attendees ?? [ ] ) ;
746732}
747733
748734/**
You can’t perform that action at this time.
0 commit comments