Comment: if user is banned, make gone text reflect that

This commit is contained in:
joshua stein 2016-02-10 16:12:11 -06:00
parent d66648ff68
commit 2b5ba63087

View file

@ -284,6 +284,8 @@ class Comment < ActiveRecord::Base
"Thread removed by moderator " <<
self.moderation.try(:moderator).try(:username).to_s << ": " <<
(self.moderation.try(:reason) || "No reason given")
elsif self.user.is_banned?
"Comment from banned user removed"
else
"Comment removed by author"
end