Skip to content
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

feat(eventsub): add remaining channel.* topics #457

Merged
merged 16 commits into from
Jan 11, 2025
Merged

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Nov 28, 2024

Finally, all channel topics... I hope there aren't many typos and copy-paste errors.

There's one typo in twitch-oauth2 I noticed, though 😔

/// The broadcaster login.
pub moderator_user_login: types::UserName,
/// The action being taken
#[serde(flatten)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit unfortunate as it means that serde will parse unknown fields into some intermediate map, which is then passed to ActionV1::deserialize, because it doesn't know the fields of ActionV1.

@Emilgardis Emilgardis mentioned this pull request Dec 26, 2024
Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

I think we could replace the various tests with snapshots instead with insta, can be done later

#[cfg_attr(feature = "deny_unknown_fields", serde(deny_unknown_fields))]
#[non_exhaustive]
pub struct ChannelModeratorAddV1 {
/// The broadcaster user ID for the channel you want to get moderator addition notifications for.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this can be worded better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about "The user ID for the channel you want to get moderator addition notifications for."? Or maybe even drop the "you want to ..." part? The text from the Twitch docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the part im struggling with is moderator addition, but it's fine, just a nit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used "Get notifications when a {mod/vip} is {added/removed} in this channel".

twitch_oauth2::Scope::ChannelReadGuestStar,
twitch_oauth2::Scope::ChannelManageGuestStar,
twitch_oauth2::Scope::ModeratorReadGuestStar,
twitch_oauth2::Scope::ModeratorManageGuestStart, // XXX: this is wrong
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update twitch_oauth2 to 0.15.0 and fix the typo, then feel free to merge this!

@Nerixyz Nerixyz force-pushed the feat/small-eventsub branch from f24439c to 2172a22 Compare January 11, 2025 21:17
@Nerixyz Nerixyz force-pushed the feat/small-eventsub branch from 2172a22 to 00248c0 Compare January 11, 2025 21:18
@Nerixyz Nerixyz enabled auto-merge January 11, 2025 21:22
@Nerixyz Nerixyz added this pull request to the merge queue Jan 11, 2025
Merged via the queue into main with commit df809c1 Jan 11, 2025
19 checks passed
@Nerixyz Nerixyz deleted the feat/small-eventsub branch January 11, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants