Skip to content

Commit

Permalink
fix: fixed the domain representation in chatProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Jun 3, 2024
1 parent 72eac53 commit 0f4d069
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export const ChatProfile: React.FC<IChatProfile> = ({
profile.abbrRecipient = getAbbreiatedRecipient(recipient);
profile.desc = profileInfo.profile?.desc;
profile.isGroup = false;
profile.web3Name = chatId.includes('.') ? chatId : null;
} else {
throw new Error(
'UIWeb::ChatProfile::user.profile.info fetch error, possible push user does not exist.'
Expand All @@ -180,13 +181,14 @@ export const ChatProfile: React.FC<IChatProfile> = ({
profile.icon = null;
profile.chatId = derivedChatId;
profile.recipient = recipient;
profile.web3Name = chatId.includes('.') ? chatId : null;
profile.abbrRecipient = getAbbreiatedRecipient(recipient);
profile.desc = '';
profile.isGroup = false;
}

// get and set web3 name asynchrounously
if (profile.recipient) {
if (profile.recipient && !profile.web3Name) {
setupWeb3Name(profile.recipient);
}
}
Expand Down

0 comments on commit 0f4d069

Please sign in to comment.