mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:09:33 +08:00
Ensure that we skip validations when creating a post on behalf of a user.
This commit is contained in:
parent
3acabf3e2f
commit
418cb09713
|
@ -122,7 +122,8 @@ module DiscourseNarrativeBot
|
|||
i18n_post_args(discobot_username: self.discobot_user.username)
|
||||
),
|
||||
topic_id: data[:topic_id],
|
||||
skip_bot: true
|
||||
skip_bot: true,
|
||||
skip_validations: true
|
||||
})
|
||||
|
||||
set_state_data(:post_id, post.id)
|
||||
|
@ -138,7 +139,8 @@ module DiscourseNarrativeBot
|
|||
i18n_post_args(discobot_username: self.discobot_user.username)
|
||||
),
|
||||
topic_id: data[:topic_id],
|
||||
skip_bot: true
|
||||
skip_bot: true,
|
||||
skip_validations: true
|
||||
})
|
||||
|
||||
set_state_data(:post_id, post.id)
|
||||
|
@ -305,6 +307,7 @@ module DiscourseNarrativeBot
|
|||
raw: raw,
|
||||
topic_id: @topic_id
|
||||
)
|
||||
|
||||
enqueue_timeout_job(@user)
|
||||
post
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user