add code to display profiles in feed, but deactivate it for now
This commit is contained in:
@@ -394,7 +394,8 @@ export function contactForDid(
|
||||
* @param activeDid
|
||||
* @param contact
|
||||
* @param allMyDids
|
||||
* @return { known: boolean, displayName: string } where known is true if the display name is some easily-recogizable name, false if it's a generic name like "Someone Anonymous"
|
||||
* @return { known: boolean, displayName: string, profileImageUrl?: string }
|
||||
* where 'known' is true if the display name is some easily-recogizable name, false if it's a generic name like "Someone Unnamed"
|
||||
*/
|
||||
export function didInfoForContact(
|
||||
did: string | undefined,
|
||||
@@ -402,15 +403,16 @@ export function didInfoForContact(
|
||||
contact?: Contact,
|
||||
allMyDids: string[] = [],
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
): { known: boolean; displayName: string } {
|
||||
if (!did) return { displayName: "Someone Anonymous", known: false };
|
||||
if (contact) {
|
||||
): { known: boolean; displayName: string; profileImageUrl?: string } {
|
||||
if (!did) return { displayName: "Someone Unnamed/Unknown", known: false };
|
||||
if (did === activeDid) {
|
||||
return { displayName: "You", known: true };
|
||||
} else if (contact) {
|
||||
return {
|
||||
displayName: contact.name || "Contact With No Name",
|
||||
known: !!contact.name,
|
||||
profileImageUrl: contact.profileImageUrl,
|
||||
};
|
||||
} else if (did === activeDid) {
|
||||
return { displayName: "You", known: true };
|
||||
} else {
|
||||
const myId = R.find(R.equals(did), allMyDids);
|
||||
return myId
|
||||
|
||||
Reference in New Issue
Block a user