emoji: display native emoji simiarly to custom (#3147)

This commit is contained in:
John Regan
2023-07-06 15:47:38 -04:00
committed by GitHub
parent cc75be1c00
commit 58bc3ac173
5 changed files with 79 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import dynamic from 'next/dynamic';
import { Interweave } from 'interweave';
import { UrlMatcher } from 'interweave-autolink';
import { ChatMessageHighlightMatcher } from './customMatcher';
import { ChatMessageEmojiMatcher } from './emojiMatcher';
import styles from './ChatUserMessage.module.scss';
import { formatTimestamp } from './messageFmt';
import { ChatMessage } from '../../../interfaces/chat-message.model';
@@ -111,6 +112,7 @@ export const ChatUserMessage: FC<ChatUserMessageProps> = ({
matchers={[
new UrlMatcher('url', { customTLDs: ['online'] }),
new ChatMessageHighlightMatcher('highlight', { highlightString }),
new ChatMessageEmojiMatcher('emoji', { className: 'emoji' }),
]}
/>
</Tooltip>