@@ -18,7 +18,7 @@ import localeCompare from '@libs/LocaleCompare';
18
18
import { areEmailsFromSamePrivateDomain } from '@libs/LoginUtils' ;
19
19
import { getDisplayNameOrDefault } from '@libs/PersonalDetailsUtils' ;
20
20
import getPolicyEmployeeAccountIDs from '@libs/PolicyEmployeeListUtils' ;
21
- import { canReportBeMentionedWithinPolicy } from '@libs/ReportUtils' ;
21
+ import { canReportBeMentionedWithinPolicy , doesReportBelongToWorkspace , getDisplayNameForParticipant , isGroupChat , isReportParticipant } from '@libs/ReportUtils' ;
22
22
import { trimLeadingSpace } from '@libs/SuggestionUtils' ;
23
23
import { isValidRoomName } from '@libs/ValidationUtils' ;
24
24
import { searchInServer } from '@userActions/Report' ;
@@ -58,7 +58,7 @@ type SuggestionPersonalDetailsList = Record<
58
58
> ;
59
59
60
60
function getDisplayName ( details : PersonalDetails ) {
61
- const displayNameFromAccountID = ReportUtils . getDisplayNameForParticipant ( { accountID : details . accountID } ) ;
61
+ const displayNameFromAccountID = getDisplayNameForParticipant ( { accountID : details . accountID } ) ;
62
62
if ( ! displayNameFromAccountID ) {
63
63
return details . login ?. length ? details . login : '' ;
64
64
}
@@ -102,7 +102,7 @@ function SuggestionMention(
102
102
// Smaller weight means higher order in suggestion list
103
103
const getPersonalDetailsWeight = useCallback (
104
104
( detail : PersonalDetails , policyEmployeeAccountIDs : number [ ] ) : number => {
105
- if ( ReportUtils . isReportParticipant ( detail . accountID , currentReport ) ) {
105
+ if ( isReportParticipant ( detail . accountID , currentReport ) ) {
106
106
return 0 ;
107
107
}
108
108
if ( policyEmployeeAccountIDs . includes ( detail . accountID ) ) {
@@ -114,7 +114,7 @@ function SuggestionMention(
114
114
) ;
115
115
const weightedPersonalDetails : PersonalDetailsList | SuggestionPersonalDetailsList | undefined = useMemo ( ( ) => {
116
116
const policyEmployeeAccountIDs = getPolicyEmployeeAccountIDs ( policyID ) ;
117
- if ( ! ReportUtils . isGroupChat ( currentReport ) && ! ReportUtils . doesReportBelongToWorkspace ( currentReport , policyEmployeeAccountIDs , policyID ) ) {
117
+ if ( ! isGroupChat ( currentReport ) && ! doesReportBelongToWorkspace ( currentReport , policyEmployeeAccountIDs , policyID ) ) {
118
118
return personalDetails ;
119
119
}
120
120
return lodashMapValues ( personalDetails , ( detail ) =>
0 commit comments