-
-
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
Migrate viewer list to helix #4117
Conversation
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
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.
The approach you've gone with is fair, but it's not the intention of the viewer list, which is to show the people currently(within reason)
in chat.
Due to the restrictions of the response we are given, this is the approach I have imagined:
- Get the chatters list
- Get the mods list
- Get the vips list
// for broadcasters
If any of the users from the chatters response are also in the mods list, they are listed in the mods section
If any of the users from the chatters response are also in the vip list, they are listed in the vips section
Everyone else from the chatters response in the Viewers section
// for mods
If the broadcaster is in the Chatters response, place them at the top
The mods section should note that Chatterino can no longer check who is a moderator
The vips section should note Chatterino can no longer check who is a VIP
(or remove these sections when it's a mod)
Everyone else from the chatters response in the Viewers section
// for plebs
Due to Twitch restrictions, this feature is only available for moderators. If you would like to see the Viewer list, you must use the Twitch website.
{"data":[{"user_login":"felanbird"},{"user_login":"fossabot"},{"user_login":"kla
un85"},{"user_login":"ohbot"},{"user_login":"scriptorex"},{"user_login":"streame
lements"}],"pagination":{},"total":6}
bbb5fac
to
0892ba2
Compare
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
@Felanbird New stuff:
|
I'm not a mod in any large channel so you probably want to test this yourself. |
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
❌
✅ Additional:Mods should be lowercase, display name capitalization looks out of place with the rest of the list being lowercase. |
@Felanbird I changed the vectors to QStringLists which had better functionality.
|
@Felanbird I'm not sure what you mean |
And broadcaster shouldn't be in list now if it wasn't returned from the chatters response. |
|
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
@Felanbird I missed the excluding vips and mods from the main viewer list. That should be fixed now. Also:
|
Is there anything still waiting to be done for this PR? |
the longer he doesn't remember to review this the longer we get to keep the viewer list 👺 🙂 |
No - everything in this PR seems good. I'm holding off on it a bit to do a proper review/test & evaluation |
fwiw @Felanbird I agree with you lol |
Is there a reason that some moderators, vips, and chatters can't be directly filled in based on the people that have talked in the last x minutes in the chat? This is information that is already provided by just being in the chat room. Maybe displaying the |
It would definitely be a separate PR thing, if done. |
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 to still work as I would expect it to 👍
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
This reverts commit c59f506. forsen
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
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
This uses the new helix endpoints for mods, vips, and chatters to get the viewer list via the helix api instead of the tmi endpoint which may go out of date whenever the irc commands are deprecated. It basically future proofs the viewer list so that if the tmi endpoint is ever randomly deprecated the user can change a setting and it will work for mods and the broadcaster. This is opt in only and will still use the tmi endpoint by default using the same time gate functionality as we use for the irc commands. The setting is located with the other time gate settings at the bottom of the general settings tab. I intentionally copied and pasted most of the
Split::showViewerList
function instead of making a better integrated function for both use cases so that whenever it is deprecated the transition to delete the old code will be as painless as possible.