fix closed group updates undefined on no names (#2092)

This commit is contained in:
Audric Ackermann 2021-12-16 15:54:38 +11:00 committed by GitHub
parent abd146c4ca
commit 5846caffc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,6 @@ function useMessageItemProps(convoId: string) {
return {
isTyping: !!convoProps.isTyping,
lastMessage: convoProps.lastMessage,
unreadCount: convoProps.unreadCount || 0,
};
}

View File

@ -41,7 +41,8 @@ export function useConversationsUsernameWithQuoteOrFullPubkey(pubkeys: Array<str
return window.i18n('you');
}
const convo = state.conversations.conversationLookup[pubkey];
return `"${convo?.profileName}"` || `"${convo?.name}"` || pubkey;
const nameGot = convo?.profileName || convo?.name;
return nameGot?.length ? `"${nameGot}"` : pubkey;
});
});
}