mirror of
https://github.com/discourse/discourse.git
synced 2026-08-03 09:53:24 -05:00
unblock early.
This commit is contained in:
@@ -64,6 +64,10 @@ class QueuedPost < ActiveRecord::Base
|
||||
QueuedPost.transaction do
|
||||
change_to!(:approved, approved_by)
|
||||
|
||||
if user.blocked?
|
||||
user.update_columns(blocked: false)
|
||||
end
|
||||
|
||||
creator = PostCreator.new(user, create_options.merge(skip_validations: true))
|
||||
created_post = creator.create
|
||||
|
||||
@@ -71,9 +75,6 @@ class QueuedPost < ActiveRecord::Base
|
||||
raise StandardError, "Failed to create post #{raw[0..100]} #{creator.errors}"
|
||||
end
|
||||
|
||||
if user.blocked?
|
||||
user.update_columns(blocked: false)
|
||||
end
|
||||
end
|
||||
|
||||
DiscourseEvent.trigger(:approved_post, self)
|
||||
|
||||
Reference in New Issue
Block a user