Fix emoji and other related bugs (#1504)

* make system-emoji default & twitter emoji optional

* add mozilla twemoji-colr credit

* fix wrong audio duration

* set locales to empty in member count millify

* render system emoji as same size of custom emoji
This commit is contained in:
Ajay Bura 2023-10-26 09:09:27 +11:00 committed by GitHub
parent 2957a45c4b
commit f53bb28b66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 78 additions and 41 deletions

View file

@ -44,7 +44,6 @@ import {
toRem,
} from 'folds';
import { isKeyHotkey } from 'is-hotkey';
import Linkify from 'linkify-react';
import {
decryptFile,
eventWithShortcode,
@ -76,7 +75,10 @@ import {
MessageBadEncryptedContent,
MessageNotDecryptedContent,
} from '../../components/message';
import { LINKIFY_OPTS, getReactCustomHtmlParser } from '../../plugins/react-custom-html-parser';
import {
emojifyAndLinkify,
getReactCustomHtmlParser,
} from '../../plugins/react-custom-html-parser';
import {
canEditEvent,
decryptAllTimelineEvent,
@ -978,7 +980,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
if (customBody === '') <MessageEmptyContent />;
return parse(sanitizeCustomHtml(customBody), htmlReactParserOptions);
}
return <Linkify options={LINKIFY_OPTS}>{body}</Linkify>;
return emojifyAndLinkify(body, true);
};
const renderRoomMsgContent = useRoomMsgContentRenderer<[EventTimelineSet]>({