add instructions for contacting potential links to hidden people

This commit is contained in:
2025-01-29 21:01:35 -07:00
parent 1a0d46d963
commit 888e87f6c6
6 changed files with 270 additions and 76 deletions

View File

@@ -460,7 +460,7 @@ export function didInfoForContact(
} else if (contact) {
return {
displayName: contact.name || "Contact With No Name",
known: !!contact,
known: true,
profileImageUrl: contact.profileImageUrl,
};
} else {
@@ -478,6 +478,19 @@ export function didInfoForContact(
}
}
/**
* @returns full contact info object (never undefined), where did is searched in contacts and allMyDids
*/
export function didInfoObject(
did: string | undefined,
activeDid: string | undefined,
allMyDids: string[],
contacts: Contact[],
): { known: boolean; displayName: string; profileImageUrl?: string } {
const contact = contactForDid(did, contacts);
return didInfoForContact(did, activeDid, contact, allMyDids);
}
/**
always returns text, maybe something like "unnamed" or "unknown"