fix: prevent censoring of self-harm related search queries

This commit is contained in:
ThetaDev 2024-01-24 02:05:54 +01:00
parent 1c0b4205d4
commit 49d50eee7c
No known key found for this signature in database
GPG Key ID: 649CA4EBDC338394

View File

@ -300,9 +300,9 @@ module Invidious::Search
object["9:varint"] = ((page - 1) * 20).to_i64
end
# If the object is empty, return an empty string,
# otherwise encode to protobuf then to base64
return "" if object.empty?
# Prevent censoring of self harm topics
# See https://github.com/iv-org/invidious/issues/4398
object["30:varint"] = 1.to_i64
return object
.try { |i| Protodec::Any.cast_json(i) }