mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
unblock early.
This commit is contained in:
parent
34122e06df
commit
c76cb671ad
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user