diff options
| author | Fijxu <fijxu@nadeko.net> | 2025-05-08 03:12:00 -0400 |
|---|---|---|
| committer | Fijxu <fijxu@nadeko.net> | 2025-05-08 03:12:00 -0400 |
| commit | 25eade589f28e41de03111fadc6140cade7af725 (patch) | |
| tree | 9005b9e6f2f333fa0214429c8c30c752995b718b | |
| parent | d1bc15b8bffe7afad6000208dfe2cbd5601b4786 (diff) | |
| download | invidious-25eade589f28e41de03111fadc6140cade7af725.tar.gz invidious-25eade589f28e41de03111fadc6140cade7af725.tar.bz2 invidious-25eade589f28e41de03111fadc6140cade7af725.zip | |
fix: pass user to `query.process` if present.
Fixes https://github.com/iv-org/invidious/issues/5097
| -rw-r--r-- | src/invidious/routes/search.cr | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/invidious/routes/search.cr b/src/invidious/routes/search.cr index 44970922..b195c7b3 100644 --- a/src/invidious/routes/search.cr +++ b/src/invidious/routes/search.cr @@ -58,7 +58,11 @@ module Invidious::Routes::Search end begin - items = query.process + if user + items = query.process(user.as(User)) + else + items = query.process + end rescue ex : ChannelSearchException return error_template(404, "Unable to find channel with id of '#{HTML.escape(ex.channel)}'. Are you sure that's an actual channel id? It should look like 'UC4QobU6STFB0P71PMvOGN5A'.") rescue ex |
