Skip to content

Commit

Permalink
DEV: Enqueueing symbol args is deprecated (discourse#17897)
Browse files Browse the repository at this point in the history
Fixes warning:

```
Deprecation notice: Jobs::SendSystemMessage was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0)
At /var/www/discourse/lib/post_destroyer.rb:335:in `notify_deletion`
```
  • Loading branch information
CvX authored Aug 13, 2022
1 parent 4f7c298 commit 0cbdbe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/post_destroyer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def notify_deletion(reviewable, options = {})
Jobs.enqueue(
:send_system_message,
user_id: @post.user_id,
message_type: notify_responders ? :flags_agreed_and_post_deleted_for_responders : :flags_agreed_and_post_deleted,
message_type: notify_responders ? "flags_agreed_and_post_deleted_for_responders" : "flags_agreed_and_post_deleted",
message_options: {
flagged_post_raw_content: notify_responders ? options[:parent_post].raw : @post.raw,
flagged_post_response_raw_content: @post.raw,
Expand Down

0 comments on commit 0cbdbe3

Please sign in to comment.