mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
Make sending combined emoji work
This commit is contained in:
parent
d25da5f284
commit
d1e37e1c1b
2 changed files with 5 additions and 0 deletions
|
@ -48,6 +48,7 @@ export const SKIN_TONES = {
|
|||
5: '1f3ff'
|
||||
};
|
||||
export const JOINER_REPLACEMENT = /(?<!\u{E0002})\u{E0002}/gu;
|
||||
export const EMOJI_JOINER = '\u{E0002}';
|
||||
|
||||
export const IMAGE_PATHS = {
|
||||
google: 'noto',
|
||||
|
|
|
@ -11,6 +11,7 @@ import { TWITCH_POINTS_SETS, TWITCH_GLOBAL_SETS, TWITCH_PRIME_SETS, KNOWN_CODES,
|
|||
import Twilight from 'site';
|
||||
import { FFZEvent } from 'src/utilities/events';
|
||||
import { getTwitchEmoteSrcSet, getTwitchEmoteURL } from 'src/utilities/object';
|
||||
import {EMOJI_JOINER} from 'src/modules/chat/emoji';
|
||||
|
||||
export default class Input extends Module {
|
||||
constructor(...args) {
|
||||
|
@ -405,6 +406,9 @@ export default class Input extends Module {
|
|||
t.log.error(err);
|
||||
}
|
||||
|
||||
// replace ZERO WIDTH JOINER with custom joiner so combined emoji work
|
||||
inst.autocompleteInputRef.setValue(inst.chatInputRef.value.replace('\u{200d}', EMOJI_JOINER));
|
||||
|
||||
originalOnMessageSend.call(this, event);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue