This commit is contained in:
2025-01-10 21:55:08 +02:00
parent dc9e166383
commit 7b17039ee8
4 changed files with 31 additions and 10 deletions

View File

@@ -168,14 +168,14 @@ export const ChatOptions = ({ messages : untransformedMessages, goToMessage, mem
if(isPrivate === false){
return messages
.filter((message) =>
extractTextFromHTML(message?.messageText)?.includes(`@${myName}`)
extractTextFromHTML(message?.messageText)?.includes(`@${myName?.toLowerCase()}`)
)
?.sort((a, b) => b?.timestamp - a?.timestamp);
}
return messages
.filter((message) =>
extractTextFromHTML(message?.decryptedData?.message)?.includes(`@${myName}`)
extractTextFromHTML(message?.decryptedData?.message)?.includes(`@${myName?.toLowerCase()}`)
)
?.sort((a, b) => b?.timestamp - a?.timestamp);
}, [messages, myName, isPrivate]);

View File

@@ -80,7 +80,7 @@ export const MessageDisplay = ({ htmlContent, isReply }) => {
const sanitizedContent = DOMPurify.sanitize(linkify(htmlContent), {
ALLOWED_TAGS: [
'a', 'b', 'i', 'em', 'strong', 'p', 'br', 'div', 'span', 'img',
'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'code', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td'
'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'code', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 's', 'hr'
],
ALLOWED_ATTR: [
'href', 'target', 'rel', 'class', 'src', 'alt', 'title',

View File

@@ -93,7 +93,7 @@
.tiptap hr {
border: none;
border-top: 1px solid var(--gray-2);
margin: 2rem 0;
margin: 1rem 0;
}
.ProseMirror:focus-visible {
@@ -103,6 +103,7 @@
.tiptap p {
font-size: 16px;
color: white; /* Ensure paragraph text color is white */
margin: 0px;
}
.tiptap p.is-editor-empty:first-child::before {
color: #adb5bd;