FEATURE: Allow viewing of raw emails for reviewable queued posts (#7910)

If a post arrives via email but must be reviewed, we now show an
icon that can be clicked to view the raw contents of the email.

This is useful if Discourse's email parser is acting odd and the user
reviewing the post wants to know what the original contents were before
approving/rejecting the post.
This commit is contained in:
Robin Ward
2019-07-19 11:56:14 -04:00
committed by GitHub
parent 8dd3cbfcb9
commit e47e0af123
7 changed files with 55 additions and 1 deletions

View File

@@ -201,6 +201,8 @@ class NewPostManager
%w(typing_duration_msecs composer_open_duration_msecs reply_to_post_number).each do |a|
payload[a] = @args[a].to_i if @args[a]
end
payload[:via_email] = true if !!@args[:via_email]
payload[:raw_email] = @args[:raw_email] if @args[:raw_email].present?
reviewable = ReviewableQueuedPost.new(
created_by: @user,