Remove sending part of the multipart emoji workaround (#4361)

This commit is contained in:
Mm2PL 2023-02-09 16:45:53 +01:00 committed by GitHub
parent 829c48d79a
commit d38187f794
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 15 deletions

View file

@ -12,6 +12,7 @@
- Minor: Added link to streamlink docs for easier user setup. (#4217) - Minor: Added link to streamlink docs for easier user setup. (#4217)
- Minor: Added setting to turn off rendering of reply context. (#4224) - Minor: Added setting to turn off rendering of reply context. (#4224)
- Minor: Added setting to select which channels to log. (#4302) - Minor: Added setting to select which channels to log. (#4302)
- Minor: Remove sending part of the multipart emoji workaround (#4361)
- Bugfix: Fixed crash that would occur when performing certain actions after removing all tabs. (#4271) - Bugfix: Fixed crash that would occur when performing certain actions after removing all tabs. (#4271)
- Bugfix: Fixed highlight sounds not reloading on change properly. (#4194) - Bugfix: Fixed highlight sounds not reloading on change properly. (#4194)
- Bugfix: Fixed CTRL + C not working in reply thread popups. (#4209) - Bugfix: Fixed CTRL + C not working in reply thread popups. (#4209)

View file

@ -84,12 +84,6 @@ void sendWhisperMessage(const QString &text)
auto app = getApp(); auto app = getApp();
QString toSend = 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->sendMessage("jtv", toSend); app->twitch->sendMessage("jtv", toSend);
} }

View file

@ -84,6 +84,9 @@ namespace {
for (const auto jsonMessage : jsonMessages) for (const auto jsonMessage : jsonMessages)
{ {
auto content = jsonMessage.toString(); auto content = jsonMessage.toString();
// For explanation of why this exists, see src/providers/twitch/TwitchChannel.hpp,
// where these constants are defined
content.replace(COMBINED_FIXER, ZERO_WIDTH_JOINER); content.replace(COMBINED_FIXER, ZERO_WIDTH_JOINER);
auto message = auto message =

View file

@ -311,10 +311,11 @@ std::vector<MessagePtr> IrcMessageHandler::parsePrivMessage(
void IrcMessageHandler::handlePrivMessage(Communi::IrcPrivateMessage *message, void IrcMessageHandler::handlePrivMessage(Communi::IrcPrivateMessage *message,
TwitchIrcServer &server) TwitchIrcServer &server)
{ {
// This is to make sure that combined emoji go through properly, see // This is for compatibility with older Chatterino versions. Twitch didn't use
// https://github.com/Chatterino/chatterino2/issues/3384 and // to allow ZERO WIDTH JOINER unicode character, so Chatterino used ESCAPE_TAG
// instead.
// See https://github.com/Chatterino/chatterino2/issues/3384 and
// https://mm2pl.github.io/emoji_rfc.pdf for more details // https://mm2pl.github.io/emoji_rfc.pdf for more details
// Constants used here are defined in TwitchChannel.hpp
this->addMessage( this->addMessage(
message, message->target(), message, message->target(),

View file

@ -370,10 +370,6 @@ QString TwitchChannel::prepareMessage(const QString &message) const
auto app = getApp(); auto app = getApp();
QString parsedMessage = app->emotes->emojis.replaceShortCodes(message); QString parsedMessage = app->emotes->emojis.replaceShortCodes(message);
// 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
parsedMessage.replace(ZERO_WIDTH_JOINER, ESCAPE_TAG);
parsedMessage = parsedMessage.simplified(); parsedMessage = parsedMessage.simplified();
if (parsedMessage.isEmpty()) if (parsedMessage.isEmpty())

View file

@ -22,8 +22,10 @@
namespace chatterino { namespace chatterino {
// This is to make sure that combined emoji go through properly, see // This is for compatibility with older Chatterino versions. Twitch didn't use
// https://github.com/Chatterino/chatterino2/issues/3384 and // to allow ZERO WIDTH JOINER unicode character, so Chatterino used ESCAPE_TAG
// instead.
// See https://github.com/Chatterino/chatterino2/issues/3384 and
// https://mm2pl.github.io/emoji_rfc.pdf for more details // https://mm2pl.github.io/emoji_rfc.pdf for more details
const QString ZERO_WIDTH_JOINER = QString(QChar(0x200D)); const QString ZERO_WIDTH_JOINER = QString(QChar(0x200D));