mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Fix non-qualified emoji values rendering as emoji in composer
This commit is contained in:
@@ -697,7 +697,7 @@ export function normalizeShortNameCompletionQuery(query: string): string {
|
||||
* Emojify
|
||||
*/
|
||||
|
||||
function isSafeEmojifyEmoji(value: string): value is EmojiVariantValue {
|
||||
export function isSafeEmojifyEmoji(value: string): value is EmojiVariantValue {
|
||||
return isEmojiVariantValue(value) && !isEmojiVariantValueNonQualified(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import type { AciString } from '../types/ServiceId.std.js';
|
||||
import {
|
||||
getEmojiVariantByKey,
|
||||
getEmojiVariantKeyByValue,
|
||||
isEmojiVariantValue,
|
||||
isSafeEmojifyEmoji,
|
||||
} from '../components/fun/data/emojis.std.js';
|
||||
|
||||
export type Matcher = (
|
||||
@@ -466,7 +466,7 @@ export const insertEmojiOps = (
|
||||
// eslint-disable-next-line no-cond-assign
|
||||
while ((match = re.exec(text))) {
|
||||
const [emojiMatch] = match;
|
||||
if (isEmojiVariantValue(emojiMatch)) {
|
||||
if (isSafeEmojifyEmoji(emojiMatch)) {
|
||||
const variantKey = getEmojiVariantKeyByValue(emojiMatch);
|
||||
const variant = getEmojiVariantByKey(variantKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user