From ae9495ec7c17243981fc341ddff6dcbe1c831c88 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 8 Jun 2022 17:36:49 -0500 Subject: [PATCH] discord: allow only rating:g posts in SFW channels. --- app/logical/discord_slash_command/post_embed.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/logical/discord_slash_command/post_embed.rb b/app/logical/discord_slash_command/post_embed.rb index be918444e..9c9e19274 100644 --- a/app/logical/discord_slash_command/post_embed.rb +++ b/app/logical/discord_slash_command/post_embed.rb @@ -63,7 +63,7 @@ class DiscordSlashCommand end 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 def is_nsfw_channel?