Skip to content

Corrected type of IsMature field on channe.update event#115

Merged
nicklaw5 merged 1 commit intonicklaw5:mainfrom
zneix:zneix/fix/is-mature-bool
Aug 27, 2021
Merged

Corrected type of IsMature field on channe.update event#115
nicklaw5 merged 1 commit intonicklaw5:mainfrom
zneix:zneix/fix/is-mature-bool

Conversation

@zneix
Copy link
Copy Markdown
Contributor

@zneix zneix commented Aug 27, 2021

I received this json unmarshal error while trying to parse a notification received from Twitch on the EventSub's channel.update event:

2021/08/27 19:20:41 [EventSub] Failed to unmarshal notification event: json: cannot unmarshal bool into Go struct field EventSubChannelUpdateEvent.is_mature of type string, data: {"broadcaster_user_id":"97916945","broadcaster_user_login":"heryin","broadcaster_user_name":"Heryin","title":"Testin again","language":"en","category_id":"509110","category_name":"Risk of Rain 2","is_mature":false}

Seems like returned is_mature is a boolean, according to the EventSub documentation.

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 1175148509

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.639%

Totals Coverage Status
Change from base Build 1072491672: 0.0%
Covered Lines: 1064
Relevant Lines: 1101

💛 - Coveralls

Copy link
Copy Markdown
Owner

@nicklaw5 nicklaw5 left a comment

Choose a reason for hiding this comment

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

Thanks

@nicklaw5 nicklaw5 merged commit e138283 into nicklaw5:main Aug 27, 2021
@zneix zneix deleted the zneix/fix/is-mature-bool branch August 27, 2021 18:39
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.

3 participants