Implement workaround for combined emoji (#3469)

This commit is contained in:
Mm2PL
2022-01-11 00:18:02 +00:00
committed by GitHub
parent dfa3818a70
commit 820099821a
5 changed files with 47 additions and 7 deletions
@@ -66,7 +66,15 @@ void sendWhisperMessage(const QString &text)
// (hemirt) pajlada: "we should not be sending whispers through jtv, but
// rather to your own username"
auto app = getApp();
app->twitch.server->sendMessage("jtv", text.simplified());
QString toSend = text.simplified();
// This is to make sure that combined emoji go through properly, see
// https://github.com/Chatterino/chatterino2/issues/3384 and
// https://mm2pl.github.io/emoji_rfc.pdf for more details
// Constants used here are defined in TwitchChannel.hpp
toSend.replace(ZERO_WIDTH_JOINER, ESCAPE_TAG);
app->twitch.server->sendMessage("jtv", toSend);
}
bool appendWhisperMessageWordsLocally(const QStringList &words)