mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix /me not going through upon sending an identical message (#3166)
This commit is contained in:
parent
d46589ca26
commit
9a1e405563
|
@ -7,6 +7,7 @@
|
|||
- Minor: Display a system message when reloading subscription emotes to match BTTV/FFZ behavior (#3135)
|
||||
- Minor: Added a setting to hide similar messages by any user. (#2716)
|
||||
- Minor: Duplicate spaces now count towards the display message length. (#3002)
|
||||
- Bugfix: Restored ability to send duplicate `/me` messages. (#3166)
|
||||
- Bugfix: Notifications for moderators about other moderators deleting messages can now be disabled. (#3121)
|
||||
- Bugfix: Moderation mode and active filters are now preserved when opening a split as a popup. (#3113, #3130)
|
||||
- Bugfix: Fixed a bug that caused all badge highlights to use the same color. (#3132, #3134)
|
||||
|
|
|
@ -377,6 +377,16 @@ void TwitchChannel::sendMessage(const QString &message)
|
|||
if (parsedMessage == this->lastSentMessage_)
|
||||
{
|
||||
auto spaceIndex = parsedMessage.indexOf(' ');
|
||||
// If the message starts with either '/' or '.' Twitch will treat it as a command, omitting
|
||||
// first space and only rest of the arguments treated as actual message content
|
||||
// In cases when user sends a message like ". .a b" first character and first space are omitted as well
|
||||
bool ignoreFirstSpace =
|
||||
parsedMessage.at(0) == '/' || parsedMessage.at(0) == '.';
|
||||
if (ignoreFirstSpace)
|
||||
{
|
||||
spaceIndex = parsedMessage.indexOf(' ', spaceIndex + 1);
|
||||
}
|
||||
|
||||
if (spaceIndex == -1)
|
||||
{
|
||||
// no spaces found, fall back to old magic character
|
||||
|
|
Loading…
Reference in a new issue