decord/source/modules/friend_suggestions/FriendSuggestionUtils.tsx

49 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15372
// Function ID: 15373
2026-07-20 16:05:17 +00:00
// Name: getSuggestedContactNameForSuggestion
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: getSuggestedContactNameForSuggestion
2026-08-24 06:08:38 +00:00
// Module 15372 (getSuggestedContactNameForSuggestion)
import set from "set" /* 2 */;
const result = set.fileFinishedImporting("modules/friend_suggestions/FriendSuggestionUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getSuggestedContactNameForSuggestion = function getSuggestedContactNameForSuggestion(friendSuggestionName, suggestedFriend) {
let contactNames;
2026-07-29 08:29:29 +00:00
if (suggestedFriend != null) {
2026-07-20 16:05:17 +00:00
contactNames = suggestedFriend.contactNames;
}
let tmp2;
if (null != contactNames) {
let length;
2026-07-29 08:29:29 +00:00
if (suggestedFriend != null) {
2026-07-20 16:05:17 +00:00
length = suggestedFriend.contactNames.length;
}
if (length >= 2) {
let trimmed;
2026-07-29 08:29:29 +00:00
if (suggestedFriend != null) {
2026-07-20 16:05:17 +00:00
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;
}
}
}
}
};