Skip to content

Commit

Permalink
fix: use correct types for display-name/login
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Nov 20, 2024
1 parent 60936d7 commit 0bbbbf7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct ChannelPointsCustomRewardRemoveV1Payload {
/// The requested broadcaster login.
pub broadcaster_user_login: types::UserName,
/// The requested broadcaster display name.
pub broadcaster_user_name: types::UserName,
pub broadcaster_user_name: types::DisplayName,
/// Timestamp of the cooldown expiration. null if the reward isn’t on cooldown.
pub cooldown_expires_at: Option<types::Timestamp>,
/// The reward cost.
Expand Down
8 changes: 4 additions & 4 deletions src/eventsub/channel/chat/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ pub struct ChannelChatMessageV1Payload {
/// The broadcaster user ID.
pub broadcaster_user_id: types::UserId,
/// The broadcaster display name.
pub broadcaster_user_name: types::UserName,
pub broadcaster_user_name: types::DisplayName,
/// The broadcaster login.
pub broadcaster_user_login: types::UserName,
/// The user ID of the user that sent the message.
pub chatter_user_id: types::UserId,
/// The user name of the user that sent the message.
pub chatter_user_name: types::UserName,
pub chatter_user_name: types::DisplayName,
/// The user login of the user that sent the message.
pub chatter_user_login: types::UserName,
/// A UUID that identifies the message.
Expand Down Expand Up @@ -137,15 +137,15 @@ pub struct Reply {
/// User ID of the sender of the parent message.
pub parent_user_id: types::UserId,
/// User name of the sender of the parent message.
pub parent_user_name: types::UserName,
pub parent_user_name: types::DisplayName,
/// User login of the sender of the parent message.
pub parent_user_login: types::UserName,
/// An ID that identifies the parent message of the reply thread.
pub thread_message_id: types::MsgId,
/// User ID of the sender of the thread's parent message.
pub thread_user_id: types::UserId,
/// User name of the sender of the thread's parent message.
pub thread_user_name: types::UserName,
pub thread_user_name: types::DisplayName,
/// User login of the sender of the thread's parent message.
pub thread_user_login: types::UserName,
}
Expand Down
8 changes: 4 additions & 4 deletions src/eventsub/channel/subscription/end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ pub struct ChannelSubscriptionEndV1Payload {
/// The broadcaster user ID.
pub broadcaster_user_id: types::UserId,
/// The broadcaster login.
pub broadcaster_user_login: types::DisplayName,
pub broadcaster_user_login: types::UserName,
/// The broadcaster display name.
pub broadcaster_user_name: types::UserName,
pub broadcaster_user_name: types::DisplayName,
/// The user ID for the user whose subscription ended.
pub user_id: types::UserId,
/// The user login for the user whose subscription ended.
pub user_login: types::DisplayName,
pub user_login: types::UserName,
/// The user display name for the user whose subscription ended.
pub user_name: types::UserName,
pub user_name: types::DisplayName,
/// The tier of the subscription that ended. Valid values are 1000, 2000, and 3000.
pub tier: types::SubscriptionTier,
/// Whether the subscription was a gift.
Expand Down
8 changes: 4 additions & 4 deletions src/eventsub/channel/subscription/gift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ pub struct ChannelSubscriptionGiftV1Payload {
/// The broadcaster user ID.
pub broadcaster_user_id: types::UserId,
/// The broadcaster login.
pub broadcaster_user_login: types::DisplayName,
pub broadcaster_user_login: types::UserName,
/// The broadcaster display name.
pub broadcaster_user_name: types::UserName,
pub broadcaster_user_name: types::DisplayName,
/// The number of subscriptions gifted by this user in the channel. This value is null for anonymous gifts or if the gifter has opted out of sharing this information.
pub cumulative_total: Option<i64>,
/// Whether the subscription gift was anonymous.
Expand All @@ -54,9 +54,9 @@ pub struct ChannelSubscriptionGiftV1Payload {
/// The user ID of the user who sent the subscription gift. Set to null if it was an anonymous subscription gift.
pub user_id: Option<types::UserId>,
/// The user login of the user who sent the gift. Set to null if it was an anonymous subscription gift.
pub user_login: Option<types::DisplayName>,
pub user_login: Option<types::UserName>,
/// The user display name of the user who sent the gift. Set to null if it was an anonymous subscription gift.
pub user_name: Option<types::UserName>,
pub user_name: Option<types::DisplayName>,
}

#[cfg(test)]
Expand Down

0 comments on commit 0bbbbf7

Please sign in to comment.