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(parser): Update LiveChatBanner #840

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

jonz94
Copy link
Contributor

@jonz94 jonz94 commented Dec 12, 2024

This PR updates the LiveChatBanner parser:

  • Mark viewerIsCreator property as optional
  • Mark background_type property as optional
  • Add banner_type property
  • Add banner_properties_is_ephemeral property
  • Add banner_properties_auto_collapse_delay_seconds property

Example RawNode data 1:

{
  "liveChatBannerRenderer": {
    "contents": {
      "liveChatBannerRedirectRenderer": {
        /* truncated */
      }
    },
    "actionId": "ChwKGkNQR3E1Sy1jMG9rREZiWEFsQWtkRWVBeW5R",
    "targetId": "live-chat-banner",
    "isStackable": true,
    "bannerType": "LIVE_CHAT_BANNER_TYPE_CROSS_CHANNEL_REDIRECT"
  }
}

Example RawNode data 2:

{
  "liveChatBannerRenderer": {
    "header": {
      "liveChatBannerHeaderRenderer": {
        /* truncated */
      }
    },
    "contents": {
      "liveChatTextMessageRenderer": {
        /* truncated */
      }
    },
    "actionId": "ChwKGkNQM2xxTm5LbFlrREZVYkx3Z1FkUTk4SjJR",
    "viewerIsCreator": false,
    "targetId": "live-chat-banner",
    "isStackable": false,
    "backgroundType": "LIVE_CHAT_BANNER_BACKGROUND_TYPE_STATIC",
    "bannerProperties": {
      "autoCollapseDelay": {
        "seconds": "7"
      }
    },
    "bannerType": "LIVE_CHAT_BANNER_TYPE_PINNED_MESSAGE"
  }
}

Example RawNode data 3:

{
  "liveChatBannerRenderer": {
    "contents": {
      "liveChatBannerRedirectRenderer": {
        /* truncated */
      }
    },
    "actionId": "ChwKGkNOaXB3TktodllrREZSak00d2NkN1djOGxR",
    "targetId": "live-chat-banner",
    "isStackable": true,
    "bannerType": "LIVE_CHAT_BANNER_TYPE_CROSS_CHANNEL_REDIRECT"
  }
}

Example RawNode data 4:

{
  "liveChatBannerRenderer": {
    "contents": {
      "liveChatBannerChatSummaryRenderer": {
        /* truncated */
      }
    },
    "actionId": "gKonxsPlU-M_1731888622579899",
    "targetId": "live-chat-banner",
    "isStackable": true,
    "bannerProperties": {
      "isEphemeral": true,
      "autoCollapseDelay": {
        "seconds": "30"
      }
    },
    "bannerType": "LIVE_CHAT_BANNER_TYPE_CHAT_SUMMARY"
  }
}

* Mark `viewerIsCreator` property as optional
* Mark `background_type` property as optional
* Add `banner_type` property
* Add `banner_properties_is_ephemeral` property
* Add `banner_properties_auto_collapse_delay_seconds` property
@LuanRT LuanRT merged commit 69d42b2 into LuanRT:main Dec 12, 2024
4 checks passed
@jonz94 jonz94 deleted the update-LiveChatBanner branch December 12, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants