DEV: Remove deprecated PostAction.act method (#23641)
The PostAction.act class method was deprecated four years ago and marked for removal in 2.9.0. This PR removes it.
This commit is contained in:
parent
83621ccbe7
commit
950357391a
|
@ -123,19 +123,6 @@ class PostAction < ActiveRecord::Base
|
||||||
RateLimiter.new(user, "post_action-#{post.id}_#{post_action_type_id}", 4, 1.minute).performed!
|
RateLimiter.new(user, "post_action-#{post.id}_#{post_action_type_id}", 4, 1.minute).performed!
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.act(created_by, post, post_action_type_id, opts = {})
|
|
||||||
Discourse.deprecate(
|
|
||||||
"PostAction.act is deprecated. Use `PostActionCreator` instead.",
|
|
||||||
output_in_test: true,
|
|
||||||
drop_from: "2.9.0",
|
|
||||||
)
|
|
||||||
|
|
||||||
result =
|
|
||||||
PostActionCreator.new(created_by, post, post_action_type_id, message: opts[:message]).perform
|
|
||||||
|
|
||||||
result.success? ? result.post_action : nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.copy(original_post, target_post)
|
def self.copy(original_post, target_post)
|
||||||
cols_to_copy = (column_names - %w[id post_id]).join(", ")
|
cols_to_copy = (column_names - %w[id post_id]).join(", ")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue