Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
// Module ID: 16125
|
|
// Function ID: 16126
|
|
// Name: FriendSuggestionUtils
|
|
// Dependencies: [2]
|
|
// Exports: getSuggestedContactNameForSuggestion
|
|
|
|
// Module 16125 (FriendSuggestionUtils)
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const result = size.fileFinishedImporting("modules/friend_suggestions/FriendSuggestionUtils.tsx");
|
|
|
|
export const getSuggestedContactNameForSuggestion = function getSuggestedContactNameForSuggestion(friendSuggestionName, suggestedFriend) {
|
|
let contactNames;
|
|
if (suggestedFriend != null) {
|
|
contactNames = suggestedFriend.contactNames;
|
|
}
|
|
let tmp2;
|
|
if (null != contactNames) {
|
|
let length;
|
|
if (suggestedFriend != null) {
|
|
length = suggestedFriend.contactNames.length;
|
|
}
|
|
if (length >= 2) {
|
|
let trimmed;
|
|
if (suggestedFriend != null) {
|
|
const contactNames1 = suggestedFriend.contactNames;
|
|
const substr = contactNames1.slice(0, 2);
|
|
trimmed = substr.join(" ").trim();
|
|
const str2 = substr.join(" ");
|
|
}
|
|
tmp2 = trimmed;
|
|
}
|
|
}
|
|
if (null != tmp2) {
|
|
if (null == friendSuggestionName) {
|
|
if (null != tmp2) {
|
|
return tmp2;
|
|
}
|
|
}
|
|
if (null != friendSuggestionName) {
|
|
if (friendSuggestionName !== tmp2) {
|
|
if (friendSuggestionName.split(" ")[0] !== tmp2.split(" ")[0]) {
|
|
return tmp2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|