🌿 fix: forking a long conversation breaks chat structure (#4778)

* fix: branching and forking sometimes break conversation structure

* fix test for forking.

* chore: message type issues

* test: add conversation structure tests for message handling

---------

Co-authored-by: xyqyear <xyqyear@gmail.com>
This commit is contained in:
Danny Avila 2024-11-22 16:10:59 -05:00 committed by GitHub
parent 7d5be68747
commit c87a51eaab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 248 additions and 16 deletions

View file

@ -24,10 +24,10 @@ export default function Message({ message }: Pick<TMessageProps, 'message'>) {
let messageLabel = '';
if (isCreatedByUser) {
messageLabel = UsernameDisplay
? (user?.name ?? '') || user?.username
? (user?.name ?? '') || (user?.username ?? '')
: localize('com_user_message');
} else {
messageLabel = message.sender;
messageLabel = message.sender || '';
}
return (