Fix /me not going through upon sending an identical message #3166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
Whenever a message starts with
/
or.
we need to ignore first space as it is not treated as the message content by Twitch. Be it either a command starting with these characters or an escaped message, like. .foo bar
.Look at the examples below (for better visibility, spaces were replaced with underscores)
"Goes through" is based on whether sending 2 identical messages in a row through Chatterino works or not.
(as interpreted by Twitch)
foo
foo
foo_bar
foo_bar
.foo_bar
bar
.foo__bar
bar
.foo_bar_baz
bar_baz
.foo_bar__baz
bar__baz
._foo
foo
._.foo
.foo
._foo_bar
foo_bar
._foo__bar
foo__bar
.__foo_bar
foo_bar
.__foo__bar
foo__bar
Fixes #3141