fix: prevent censoring of self-harm related search queries (#4403)

* fix: prevent censoring of self-harm related search queries

* fix: yt_filters_spec with new flag
This commit is contained in:
ThetaDev 2024-01-29 14:59:25 +01:00 committed by GitHub
parent 1c0b4205d4
commit c005ada487
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 30 deletions

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) }