mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 18:58:10 +00:00
Add raw post content in "flagged post removed by staff" PM
This commit is contained in:
parent
2d354ec9b0
commit
9cf4013073
@ -2405,9 +2405,13 @@ en:
|
||||
text_body_template: |
|
||||
Hello,
|
||||
|
||||
This is an automated message from %{site_name} to let you know that your post was removed.
|
||||
This is an automated message from %{site_name} to let you know that [your post](%{base_url}%{url}) was removed.
|
||||
|
||||
<%{base_url}%{url}>
|
||||
[details="Click to expand removed post"]
|
||||
```markdown
|
||||
%{flagged_post_raw_content}
|
||||
```
|
||||
[/details]
|
||||
|
||||
%{flag_reason}
|
||||
|
||||
|
@ -232,6 +232,7 @@ class PostDestroyer
|
||||
user_id: @post.user_id,
|
||||
message_type: :flags_agreed_and_post_deleted,
|
||||
message_options: {
|
||||
flagged_post_raw_content: @post.raw,
|
||||
url: @post.url,
|
||||
flag_reason: I18n.t(
|
||||
"flag_reasons.#{@post.active_flags.last.post_action_type.name_key}",
|
||||
|
@ -650,7 +650,12 @@ describe PostDestroyer do
|
||||
expect(second_post.bookmark_count).to eq(0)
|
||||
expect(second_post.off_topic_count).to eq(1)
|
||||
|
||||
expect(Jobs::SendSystemMessage.jobs.size).to eq(1)
|
||||
jobs = Jobs::SendSystemMessage.jobs
|
||||
expect(jobs.size).to eq(1)
|
||||
|
||||
Jobs::SendSystemMessage.new.execute(jobs[0]["args"][0].with_indifferent_access)
|
||||
|
||||
expect(Post.last.raw).to include("[details=\"Click to expand removed post\"]\n```markdown\n#{second_post.raw}\n```\n[/details]")
|
||||
end
|
||||
|
||||
it "should not send the flags_agreed_and_post_deleted message if it was deleted by system" do
|
||||
|
Loading…
x
Reference in New Issue
Block a user