Mark session.directory as SFW

main
gravel 2 months 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.
*/
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 false;
}
return $this->has_nsfw_keywords() || $this->matched_by_list($NSFW_INCLUDE);
return $safety_override->rated_nsfw() ?? $this->has_nsfw_keywords();
}
/**
@ -656,8 +653,9 @@
* @return bool
*/
public function is_testing_room(): bool {
global $TESTING_INCLUDE;
return in_array("test", $this->string_tags) || $this->matched_by_list($TESTING_INCLUDE);
return
in_array("test", $this->string_tags)
|| LocalConfig::get_instance()->is_testing_room($this);
}
/**
@ -666,8 +664,7 @@
* @return bool
*/
public function is_stickied_room(): bool {
global $STICKIED_ROOMS;
return $this->matched_by_list($STICKIED_ROOMS);
return LocalConfig::get_instance()->is_stickied_room($this);
}
/**

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

Loading…
Cancel
Save