-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Handle follower emotes differently if subscribed #4922
Conversation
If we also have a subscriber emote set for a channel, then don't treat a follower emote set as local to that channel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Those suggestions are all shit you can go ahead and revert them, the bot doesn't always get it right |
This reverts commit 6e7ad02.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work
Also, we could hook on subscription event to update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good. Just a note: Twitch announced a Get User Emotes endpoint in their Standard Output stream. However, it isn't clear how this will handle follower emotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this change, prevent the double serialization on merge if anyone really cares (they probably do) but I'm glad to have a working solution to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great first contribution!
Co-authored-by: iProdigy <8106344+iProdigy@users.noreply.github.com>
@Mm2PL want to take a peek? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works as expected. Thank you for your contribution.
Thank you @baines! As a first-time contributor, you can now add yourself to the contributors list that's shown inside the About page in Chatterino. If you want this, you can open a new PR where you modify the |
If we also have a subscriber emote set for a channel, then don't treat a follower emote set as local to that channel.
Description
On Twitch it's possible to use a channel's follower emotes everywhere if also subscribed to the followed channel.
But Chatterino did not show the emotes as available in other channels or allow them to be auto-completed in this case.
This PR makes a small change so that if we also have a subscriber emote set for a channel, then the follower emote set is not treated as
local
.I know there's another PR to implement this behaviour (#4281) but I'm not confident enough with the changes in there to pick that one up.
This code doesn't attempt to convert an existing local set into a non-local one or vice versa (when subscription is gained/lost). I don't know if twitch sends another GLOBALUSERSTATE with the emote sets when that happens or what.
It's also making an assumption that
loadUserstateEmotes
is called only once after all the emote sets are known. If they can come in "piecemeal" then it might not find the subscriber set if it's in a later batch than the follower one.(felanbird): Closes #4233