We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2a738c commit 9233f71Copy full SHA for 9233f71
src/invidious/comments.cr
@@ -276,7 +276,7 @@ def fetch_reddit_comments(id, sort_by = "confidence")
276
277
# For videos that have more than one thread, choose the one with the highest score
278
threads = search_results.data.as(RedditListing).children
279
- thread = threads.max_by? { |child| child.data.as(RedditLink).score }.try(&.data.as(RedditLink))
+ thread = threads.max_by?(&.data.as(RedditLink).score).try(&.data.as(RedditLink))
280
result = thread.try do |t|
281
body = client.get("/r/#{t.subreddit}/comments/#{t.id}.json?limit=100&sort=#{sort_by}", headers).body
282
Array(RedditThing).from_json(body)
0 commit comments