File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11651165 messageDiv.dataset.messageId = message.id;
11661166 }
11671167
1168- const isOwnMessage = currentUser && message.authorId && message.authorId === currentUser.info.id;
1168+ const chat = chats.find(c => c.id === currentChatId);
1169+
1170+ // Check if this is a personal notes chat (chat with oneself)
1171+ const otherUser = chat?.isPersonal ? chat.allUsers.find(user => user.id !== currentUser?.info.id) : null;
1172+ const isPersonalNotesChat = chat?.isPersonal && (!otherUser || otherUser.id === currentUser?.info.id);
1173+
1174+ const isOwnMessage = currentUser && message.authorId && message.authorId === currentUser.info.id && !isPersonalNotesChat;
11691175 if (isOwnMessage) {
11701176 messageDiv.classList.add('own');
11711177 }
11811187 }
11821188
11831189 // Find author info
1184- const chat = chats.find(c => c.id === currentChatId);
11851190 const author = chat?.allUsers.find(user => user.id === message.authorId);
11861191 const authorName = author ? author.name : 'Unknown';
11871192 const authorInitials = author ? getInitials(author.name) : '?';
You can’t perform that action at this time.
0 commit comments