diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-07 19:36:16 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-07 19:36:16 -0500 |
| commit | f588132cadc2708666a6631b185e62d33428bd40 (patch) | |
| tree | a0ef0407dba333c48ee9089e6260ac4aa5fa1e34 | |
| parent | 0f6fcf5833b1a1ae55705cdae1ce760588c69578 (diff) | |
| download | invidious-f588132cadc2708666a6631b185e62d33428bd40.tar.gz invidious-f588132cadc2708666a6631b185e62d33428bd40.tar.bz2 invidious-f588132cadc2708666a6631b185e62d33428bd40.zip | |
Replace comment published with timestamp
| -rw-r--r-- | src/invidious.cr | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 66846fdd..9b54629f 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1831,8 +1831,10 @@ get "/api/v1/comments/:id" do |env| json.field "authorUrl", "" end + published = decode_date(node_comment["publishedTimeText"]["runs"][0]["text"].as_s.rchop(" (edited)")) + json.field "content", content_text - json.field "published", node_comment["publishedTimeText"]["runs"][0]["text"] + json.field "published", published.epoch json.field "likeCount", node_comment["likeCount"] json.field "commentId", node_comment["commentId"] |
