Skip to content

Commit

Permalink
DEV: Replace deprecated PostAction.act with PostActionCreator.create
Browse files Browse the repository at this point in the history
  • Loading branch information
Drenmi committed Sep 23, 2023
1 parent bd0fd4a commit 5fc17d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/discourse_perspective.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def self.extract_value_from_analyze_comment_response(response)

def self.flag_on_scores(score, post)
if score[:score] > SiteSetting.perspective_flag_post_min_toxicity
PostAction.act(
PostActionCreator.create(
Discourse.system_user,
post,
PostActionType.types[:notify_moderators],
:notify_moderators,
message: I18n.t("perspective_flag_message"),
)
end
Expand Down

0 comments on commit 5fc17d2

Please sign in to comment.