[Glitch] Emoji: Bypass legacy emoji normalization

Port 3c9b828c71 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo authored and Claire committed 2025-10-08 18:22:47 +02:00
1 parent 1c278df424
commit f870904e5f
6 files changed
+16 -20

No files matched your search

@@ -61,7 +61,7 @@ export const AccountBio: React.FC<AccountBioProps> = ({
if (!account) {
return '';
}
return isModernEmojiEnabled() ? account.note : account.note_emojified;
return account.note_emojified;
});
const extraEmojis = useAppSelector((state) => {
const account = state.accounts.get(accountId);
@@ -2,8 +2,6 @@ import type { ComponentPropsWithoutRef, FC } from 'react';
import classNames from 'classnames';
import { isModernEmojiEnabled } from '@/flavours/glitch/utils/environment';
import { AnimateEmojiProvider } from '../emoji/context';
import { EmojiHTML } from '../emoji/html';
import { Skeleton } from '../skeleton';
@@ -24,11 +22,7 @@ export const DisplayNameWithoutDomain: FC<
{account ? (
<EmojiHTML
className='display-name__html'
htmlString={
isModernEmojiEnabled()
? account.get('display_name')
: account.get('display_name_html')
}
htmlString={account.get('display_name_html')}
as='strong'
extraEmojis={account.get('emojis')}
/>
@@ -1,7 +1,5 @@
import type { ComponentPropsWithoutRef, FC } from 'react';
import { isModernEmojiEnabled } from '@/flavours/glitch/utils/environment';
import { EmojiHTML } from '../emoji/html';
import type { DisplayNameProps } from './index';
@@ -19,11 +17,7 @@ export const DisplayNameSimple: FC<
<EmojiHTML
{...props}
as='span'
htmlString={
isModernEmojiEnabled()
? account.get('display_name')
: account.get('display_name_html')
}
htmlString={account.get('display_name_html')}
extraEmojis={account.get('emojis')}
/>
</bdi>
@@ -84,9 +84,6 @@ const isLinkMisleading = (link) => {
* @returns {string}
*/
export function getStatusContent(status) {
if (isModernEmojiEnabled()) {
return status.getIn(['translation', 'content']) || status.get('content');
}
return status.getIn(['translation', 'contentHtml']) || status.get('contentHtml');
}