💭 fix: Message Labels and Typing Issues (#3602)

* 💭 fix: message labels due to typing issues

* feat: Fix empty message text in MessageRender component
This commit is contained in:
Danny Avila 2024-08-09 17:59:51 -04:00 committed by GitHub
parent 1ff4841603
commit 22c8b6f699
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 10 deletions

View file

@ -73,7 +73,7 @@ export default function useMessageActions(props: TMessageActions) {
const messageLabel = useMemo(() => {
if (message?.isCreatedByUser === true) {
return UsernameDisplay ? user?.name != null || user?.username : localize('com_user_message');
return UsernameDisplay ? (user?.name ?? '') || user?.username : localize('com_user_message');
} else if (assistant) {
return assistant.name ?? 'Assistant';
} else {