diff --git a/CHANGELOG.md b/CHANGELOG.md index be449aabc..84dd05626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Minor: Received IRC messages use `time` message tag for timestamp if it's available. (#3021) - Minor: Added informative messages for recent-messages API's errors. (#3029) - Minor: Added section with helpful Chatterino-related links to the About page. (#3068) +- Minor: Now uses spaces instead of magic Unicode character for sending duplicate messages (#3081) - Minor: Added `channel.live` filter variable (#3092) - Bugfix: Fixed "smiley" emotes being unable to be "Tabbed" with autocompletion, introduced in v2.3.3. (#3010) - Bugfix: Fixed PubSub not properly trying to resolve pending listens when the pending listens list was larger than 50. (#3037) diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 4571cca22..95b3f6944 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -375,7 +375,17 @@ void TwitchChannel::sendMessage(const QString &message) { if (parsedMessage == this->lastSentMessage_) { - parsedMessage.append(MAGIC_MESSAGE_SUFFIX); + auto spaceIndex = parsedMessage.indexOf(' '); + if (spaceIndex == -1) + { + // no spaces found, fall back to old magic character + parsedMessage.append(MAGIC_MESSAGE_SUFFIX); + } + else + { + // replace the space we found in spaceIndex with two spaces + parsedMessage.replace(spaceIndex, 1, " "); + } } } }