Skip to content

Commit

Permalink
I misread that yesterday, whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jan 28, 2024
1 parent 8ad34bb commit cd104d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions TwitchDownloaderCore/Chat/ChatJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,12 @@ private static async Task UpgradeChatJson(ChatRoot chatRoot)

if (!int.TryParse(chatRoot.video.user_id, out var assumedId))
{
if (!int.TryParse(broadcaster.Value?.commenter._id, out assumedId))
if (chatRoot.comments.FirstOrDefault(x => int.TryParse(x.channel_id, out assumedId)) is null)
{
assumedId = 0;
if (!int.TryParse(broadcaster.Value?.commenter._id, out assumedId))
{
assumedId = 0;
}
}
}

Expand Down

0 comments on commit cd104d0

Please sign in to comment.