5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-15 05:26:35 +00:00

don't undelete deleted comments when user is undeleted

I don't think User#undelete has been called in prod, but comments are no
longer all deleted when a user is and anyway this would undelete comments that
the user had manually deleted prior to account deletion, and undelete comments
that moderators had deleted.
This commit is contained in:
Peter Bhat Harkins 2018-02-12 11:39:54 -06:00
parent b7132cb953
commit 05c613d356

View File

@ -326,8 +326,6 @@ class User < ActiveRecord::Base
def undelete!
User.transaction do
self.comments.each{|c| c.undelete_for_user(self) }
self.sent_messages.each do |m|
m.deleted_by_author = false
m.save