Skip to content

Commit

Permalink
don't error when a channel doesn't have any community posts
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer committed Feb 14, 2024
1 parent 5c0b6d8 commit eaf467d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/invidious/channels/community.cr
Expand Up @@ -57,6 +57,17 @@ def extract_channel_community(items, *, ucid, locale, format, thin_mode, is_sing
.try &.as_s || ""
if error_message == "This channel does not exist."
raise NotFoundException.new(error_message)
elsif error_message == "This channel hasn't posted yet"
response = JSON.build do |json|
json.object do
json.field "authorId", ucid
json.field "comments" do
json.array do
end
end
end
end
return response
else
raise InfoException.new(error_message)
end
Expand Down

0 comments on commit eaf467d

Please sign in to comment.