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