discord: allow only rating:g posts in SFW channels.
This commit is contained in:
@@ -63,7 +63,7 @@ class DiscordSlashCommand
|
|||||||
end
|
end
|
||||||
|
|
||||||
def is_censored?
|
def is_censored?
|
||||||
(post.rating.in?(["q", "e"]) && !is_nsfw_channel?) || !post.visible?(User.anonymous) || censored_tags.any? { |tag| tag.in?(post.tag_array) }
|
(post.rating != 'g' && !is_nsfw_channel?) || !post.visible?(User.anonymous) || censored_tags.any? { |tag| tag.in?(post.tag_array) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_nsfw_channel?
|
def is_nsfw_channel?
|
||||||
|
|||||||
Reference in New Issue
Block a user