-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Correctly handle twitch subscriber emotes #591
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
- Coverage 19.20% 18.21% -1.00%
==========================================
Files 41 41
Lines 5102 5310 +208
==========================================
- Hits 980 967 -13
- Misses 4122 4343 +221 ☔ View full report in Codecov by Sentry. |
Seems like rust 1.78 added a bunch of clippy lints. How do you want to proceed with those? |
You can ignore them if you want. As long as it builds and actually functions, all is good. |
Having the user clear the cache sounds good to me. I'll put a note in the next release that includes a note saying to do so. |
Okay this should be feature complete now, feel free to test. I am not subscribed to any twitch channel, so I'm not really able to test the emote picker nor sending messages that contains subscriber only emotes, but receiving them works nicely on my end. I ended up moving the code around a bit in the message parsing, as the message can be now parsed 3 different ways depending on where it came from. (This is mostly why the diff is so large)
I also now cache the twitch user id when the first request is made, so getting the following list should be a bit quicker now. I still need to document this stuff somewhere and maybe cleanup a few things, but this should be ready to merge soon. |
23f22e0
to
ee2bb7b
Compare
This should now be ready to merge once #595 is merged. I rebased on top of this PR so that checks pass. |
#595 has been merged. |
ee2bb7b
to
bc12fca
Compare
Just rebased on top of main |
bc12fca
to
9f340bd
Compare
I had committed my cargo.toml by mistake, fixed that |
ef84cf6
to
df368d7
Compare
df368d7
to
4189ff4
Compare
I fixed a few issues I found while testing this some more. Hopefully everything should be good now. Also rebased on top of main. EDIT: I also noticed that you need the |
4189ff4
to
b2c61bf
Compare
Oops broke the tests, should be good now. |
Sorry I haven't been able to review this, been focusing on a couple other projects. Hope to review in the next week or so. |
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.
Ran it after clearing cache, works perfectly. Just making sure, should I still warn users about a non-cleared cache in the release, or is that unnecessary? Thanks!
Yes, clearing cache is still needed, but not clearing it will just make twt use the static images for already downloaded animated twitch emotes. Thanks for the review! |
b2c61bf
to
0ceeda2
Compare
Just rebased on top of main |
Thank you again! |
I'll put this in a release once #611 is resolved. |
This PR switches to parsing the emotes irc tag to find twitch emotes to display, to actually correctly display emotes from people that are subbed to a channel.
Users subscribed to a channel can use emotes from this channel into other channels chat, this enables detection of such emotes.
There's still a bit of work to do to detect emotes that the current user can use, to display them in the emote picker, and I need to clean up the code and do some tests, so this is why this is a draft PR.
This also reverts the change that added the '-animated' string at the end of animated twitch emotes (#587), as I found it complicates stuff a bit. (ie. I would need to check the cache for both the animated and normal version if they had different name). The only issue is that users would need to delete the cache to switch to the animated version of the twitch emotes, if they had the static one already in cache.
If you would prefer to not need user intervention, I can try to think of a way to avoid this, but clearing the cache is definitely the easier option.