Browse Source

FIX : Chat: words containing one or more dots are turned into links #2898 (#2903)

* FIX: Chat: words containing one or more dots are turned into links #2898

Making validateTLD to true and also adding a parameter of customTLDs

* Update ChatUserMessage.tsx

* Prettified Code!

---------

Co-authored-by: dev265545 <dev265545@users.noreply.github.com>
gek/fix-access-token-validation
Dev Gupta 2 years ago committed by GitHub
parent
commit
11a3a79032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      web/components/chat/ChatSystemMessage/ChatSystemMessage.tsx
  2. 2
      web/components/chat/ChatUserMessage/ChatUserMessage.tsx

2
web/components/chat/ChatSystemMessage/ChatSystemMessage.tsx

@ -26,7 +26,7 @@ export const ChatSystemMessage: FC<ChatSystemMessageProps> = ({ @@ -26,7 +26,7 @@ export const ChatSystemMessage: FC<ChatSystemMessageProps> = ({
className={styles.message}
content={body}
matchers={[
new UrlMatcher('url', { validateTLD: false }),
new UrlMatcher('url',{ customTLDs: ['online'] }),
new ChatMessageHighlightMatcher('highlight', { highlightString }),
]}
/>

2
web/components/chat/ChatUserMessage/ChatUserMessage.tsx

@ -110,7 +110,7 @@ export const ChatUserMessage: FC<ChatUserMessageProps> = ({ @@ -110,7 +110,7 @@ export const ChatUserMessage: FC<ChatUserMessageProps> = ({
className={styles.message}
content={body}
matchers={[
new UrlMatcher('url', { validateTLD: false }),
new UrlMatcher('url', { customTLDs: ['online'] }),
new ChatMessageHighlightMatcher('highlight', { highlightString }),
]}
/>

Loading…
Cancel
Save