Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use double spaces instead of Chatterino character when possible #3081

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 11 additions & 1 deletion src/providers/twitch/TwitchChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Mm2PL marked this conversation as resolved.
Show resolved Hide resolved
}
else
{
// replace the space we found in spaceIndex with two spaces
parsedMessage.replace(spaceIndex, 1, " ");
}
}
}
}
Expand Down