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:
Ted Johansson 2023-09-24 15:16:32 +08:00 committed by GitHub
parent 83621ccbe7
commit 950357391a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 13 deletions

View File

@ -123,19 +123,6 @@ class PostAction < ActiveRecord::Base
RateLimiter.new(user, "post_action-#{post.id}_#{post_action_type_id}", 4, 1.minute).performed!
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)
cols_to_copy = (column_names - %w[id post_id]).join(", ")