diff options
| author | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-09 17:13:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-09 17:13:21 -0500 |
| commit | e0c70d34cc3f937149d5c36c76aed8d8b57b4de5 (patch) | |
| tree | f447f7f435746c70db052aa3a5c99cc22e919ac4 /src | |
| parent | b893bdac0d6b76a61e2cd972b29e44cf5b9c88f0 (diff) | |
| download | invidious-e0c70d34cc3f937149d5c36c76aed8d8b57b4de5.tar.gz invidious-e0c70d34cc3f937149d5c36c76aed8d8b57b4de5.tar.bz2 invidious-e0c70d34cc3f937149d5c36c76aed8d8b57b4de5.zip | |
Make sure pinnedCommentBadge isn't equal to false
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 357a461c..41b0efa8 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -181,7 +181,7 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b json.field "content", html_to_content(content_html) json.field "contentHtml", content_html - json.field "isPinned", (node_comment["pinnedCommentBadge"]? != nil) + json.field "isPinned", (node_comment["pinnedCommentBadge"]?.try(&.as_bool) == true) json.field "published", published.to_unix json.field "publishedText", translate(locale, "`x` ago", recode_date(published, locale)) |
