mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
This commit is contained in:
@ -596,12 +596,9 @@ class ImportScripts::Base
|
||||
skipped += 1
|
||||
puts "Skipping bookmark for user id #{params[:user_id]} and post id #{params[:post_id]}"
|
||||
else
|
||||
begin
|
||||
PostAction.act(user, post, PostActionType.types[:bookmark])
|
||||
created += 1
|
||||
rescue PostAction::AlreadyActed
|
||||
skipped += 1
|
||||
end
|
||||
result = PostActionCreator.create(user, post, :bookmark)
|
||||
created += 1 if result.success?
|
||||
skipped += 1 if result.failed?
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user