diff --git a/CHANGELOG.md b/CHANGELOG.md index e9aa1ccae..e6e0ecd50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - 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 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 highlight sounds not reloading on change properly. (#4194) - Bugfix: Fixed CTRL + C not working in reply thread popups. (#4209) diff --git a/src/controllers/commands/CommandController.cpp b/src/controllers/commands/CommandController.cpp index 7268d3356..d8d766f0b 100644 --- a/src/controllers/commands/CommandController.cpp +++ b/src/controllers/commands/CommandController.cpp @@ -84,12 +84,6 @@ void sendWhisperMessage(const QString &text) auto app = getApp(); 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); } diff --git a/src/providers/RecentMessagesApi.cpp b/src/providers/RecentMessagesApi.cpp index 1544b74d2..dad429d3c 100644 --- a/src/providers/RecentMessagesApi.cpp +++ b/src/providers/RecentMessagesApi.cpp @@ -84,6 +84,9 @@ namespace { for (const auto jsonMessage : jsonMessages) { 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); auto message = diff --git a/src/providers/twitch/IrcMessageHandler.cpp b/src/providers/twitch/IrcMessageHandler.cpp index 15d6a4898..1c04eac4e 100644 --- a/src/providers/twitch/IrcMessageHandler.cpp +++ b/src/providers/twitch/IrcMessageHandler.cpp @@ -311,10 +311,11 @@ std::vector IrcMessageHandler::parsePrivMessage( void IrcMessageHandler::handlePrivMessage(Communi::IrcPrivateMessage *message, TwitchIrcServer &server) { - // This is to make sure that combined emoji go through properly, see - // https://github.com/Chatterino/chatterino2/issues/3384 and + // This is for compatibility with older Chatterino versions. Twitch didn't use + // 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 - // Constants used here are defined in TwitchChannel.hpp this->addMessage( message, message->target(), diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index a06e61b0b..89972c8d0 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -370,10 +370,6 @@ QString TwitchChannel::prepareMessage(const QString &message) const auto app = getApp(); 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(); if (parsedMessage.isEmpty()) diff --git a/src/providers/twitch/TwitchChannel.hpp b/src/providers/twitch/TwitchChannel.hpp index 2074ad2c1..746b54ed6 100644 --- a/src/providers/twitch/TwitchChannel.hpp +++ b/src/providers/twitch/TwitchChannel.hpp @@ -22,8 +22,10 @@ namespace chatterino { -// This is to make sure that combined emoji go through properly, see -// https://github.com/Chatterino/chatterino2/issues/3384 and +// This is for compatibility with older Chatterino versions. Twitch didn't use +// 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 const QString ZERO_WIDTH_JOINER = QString(QChar(0x200D));