mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Fix comment replies
This commit is contained in:
parent
9a15438c71
commit
6bb747b579
1 changed files with 11 additions and 2 deletions
|
@ -1842,8 +1842,17 @@ get "/api/v1/comments/:id" do |env|
|
||||||
comments = JSON.parse(comments)
|
comments = JSON.parse(comments)
|
||||||
content_html = template_youtube_comments(comments)
|
content_html = template_youtube_comments(comments)
|
||||||
|
|
||||||
next {"contentHtml" => content_html,
|
response = JSON.build do |json|
|
||||||
"commentCount" => comments["commentCount"]}.to_json
|
json.object do
|
||||||
|
json.field "contentHtml", content_html
|
||||||
|
|
||||||
|
if comments["commentCount"]?
|
||||||
|
json.field "commentCount", comments["commentCount"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
next response
|
||||||
end
|
end
|
||||||
elsif source == "reddit"
|
elsif source == "reddit"
|
||||||
client = make_client(REDDIT_URL)
|
client = make_client(REDDIT_URL)
|
||||||
|
|
Loading…
Reference in a new issue