mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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:
parent
9a56b398a1
commit
b58867b6e9
354 changed files with 8090 additions and 5225 deletions
|
@ -165,8 +165,6 @@ class ImportScripts::StackOverflow < ImportScripts::Base
|
|||
end
|
||||
end
|
||||
|
||||
LIKE ||= PostActionType.types[:like]
|
||||
|
||||
def import_likes
|
||||
puts "", "Importing post likes..."
|
||||
|
||||
|
@ -196,7 +194,7 @@ class ImportScripts::StackOverflow < ImportScripts::Base
|
|||
next unless post_id = post_id_from_imported_post_id(l["PostId"])
|
||||
next unless user = User.find_by(id: user_id)
|
||||
next unless post = Post.find_by(id: post_id)
|
||||
PostAction.act(user, post, LIKE) rescue nil
|
||||
PostActionCreator.like(user, post) rescue nil
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -229,7 +227,7 @@ class ImportScripts::StackOverflow < ImportScripts::Base
|
|||
next unless post_id = post_id_from_imported_post_id(l["PostCommentId"])
|
||||
next unless user = User.find_by(id: user_id)
|
||||
next unless post = Post.find_by(id: post_id)
|
||||
PostAction.act(user, post, LIKE) rescue nil
|
||||
PostActionCreator.like(user, post) rescue nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue