Mark session.directory as SFW

dev
gravel 1 year ago
parent 75d67a7c95
commit d5b1026064
No known key found for this signature in database
GPG Key ID: CA95FFF4E0123903

@ -641,13 +641,10 @@
* Determine whether the Community is not safe for work. * Determine whether the Community is not safe for work.
*/ */
public function rated_nsfw(): bool { public function rated_nsfw(): bool {
global $NSFW_INCLUDE, $NSFW_EXCLUDE; $safety_override =
LocalConfig::get_instance()->get_room_safety_override($this);
if ($this->matched_by_list($NSFW_EXCLUDE)) { return $safety_override->rated_nsfw() ?? $this->has_nsfw_keywords();
return false;
}
return $this->has_nsfw_keywords() || $this->matched_by_list($NSFW_INCLUDE);
} }
/** /**
@ -656,8 +653,9 @@
* @return bool * @return bool
*/ */
public function is_testing_room(): bool { public function is_testing_room(): bool {
global $TESTING_INCLUDE; return
return in_array("test", $this->string_tags) || $this->matched_by_list($TESTING_INCLUDE); in_array("test", $this->string_tags)
|| LocalConfig::get_instance()->is_testing_room($this);
} }
/** /**
@ -666,8 +664,7 @@
* @return bool * @return bool
*/ */
public function is_stickied_room(): bool { public function is_stickied_room(): bool {
global $STICKIED_ROOMS; return LocalConfig::get_instance()->is_stickied_room($this);
return $this->matched_by_list($STICKIED_ROOMS);
} }
/** /**

@ -102,8 +102,8 @@
href="https://session.directory/" href="https://session.directory/"
class="footer__nav-target" class="footer__nav-target"
target="_blank" target="_blank"
title="User-submitted closed groups, communities and user profiles. Not safe for work." title="User-submitted closed groups, communities and user profiles."
>session.directory (NSFW)</a >session.directory<a
><a ><a
href="https://oxen.directory/" href="https://oxen.directory/"
class="footer__nav-target" class="footer__nav-target"

Loading…
Cancel
Save