mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 07:24:52 +08:00
Add raw post content in "flagged post removed by staff" PM
This commit is contained in:
@ -2405,9 +2405,13 @@ en:
|
|||||||
text_body_template: |
|
text_body_template: |
|
||||||
Hello,
|
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}
|
%{flag_reason}
|
||||||
|
|
||||||
|
@ -232,6 +232,7 @@ class PostDestroyer
|
|||||||
user_id: @post.user_id,
|
user_id: @post.user_id,
|
||||||
message_type: :flags_agreed_and_post_deleted,
|
message_type: :flags_agreed_and_post_deleted,
|
||||||
message_options: {
|
message_options: {
|
||||||
|
flagged_post_raw_content: @post.raw,
|
||||||
url: @post.url,
|
url: @post.url,
|
||||||
flag_reason: I18n.t(
|
flag_reason: I18n.t(
|
||||||
"flag_reasons.#{@post.active_flags.last.post_action_type.name_key}",
|
"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.bookmark_count).to eq(0)
|
||||||
expect(second_post.off_topic_count).to eq(1)
|
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
|
end
|
||||||
|
|
||||||
it "should not send the flags_agreed_and_post_deleted message if it was deleted by system" do
|
it "should not send the flags_agreed_and_post_deleted message if it was deleted by system" do
|
||||||
|
Reference in New Issue
Block a user