Merge branch 'report-email-from-remote-user' into 'develop'
Remove Reply-To from report emails Closes #1141 See merge request pleroma/pleroma!1531
This commit is contained in:
commit
fd60fd4713
@ -36,6 +36,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Not being able to access the Mastodon FE login page on private instances
|
- Not being able to access the Mastodon FE login page on private instances
|
||||||
- Invalid SemVer version generation, when the current branch does not have commits ahead of tag/checked out on a tag
|
- Invalid SemVer version generation, when the current branch does not have commits ahead of tag/checked out on a tag
|
||||||
- Pleroma.Upload base_url was not automatically whitelisted by MediaProxy. Now your custom CDN or file hosting will be accessed directly as expected.
|
- Pleroma.Upload base_url was not automatically whitelisted by MediaProxy. Now your custom CDN or file hosting will be accessed directly as expected.
|
||||||
|
- Report email not being sent to admins when the reporter is a remote user
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- MRF: Support for priming the mediaproxy cache (`Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`)
|
- MRF: Support for priming the mediaproxy cache (`Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`)
|
||||||
@ -79,6 +80,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Emoji: Remove longfox emojis.
|
- Emoji: Remove longfox emojis.
|
||||||
|
- Remove `Reply-To` header from report emails for admins.
|
||||||
|
|
||||||
## [1.0.1] - 2019-07-14
|
## [1.0.1] - 2019-07-14
|
||||||
### Security
|
### Security
|
||||||
|
@ -63,7 +63,6 @@ defmodule Pleroma.Emails.AdminEmail do
|
|||||||
new()
|
new()
|
||||||
|> to({to.name, to.email})
|
|> to({to.name, to.email})
|
||||||
|> from({instance_name(), instance_notify_email()})
|
|> from({instance_name(), instance_notify_email()})
|
||||||
|> reply_to({reporter.name, reporter.email})
|
|
||||||
|> subject("#{instance_name()} Report")
|
|> subject("#{instance_name()} Report")
|
||||||
|> html_body(html_body)
|
|> html_body(html_body)
|
||||||
end
|
end
|
||||||
|
@ -24,7 +24,6 @@ defmodule Pleroma.Emails.AdminEmailTest do
|
|||||||
|
|
||||||
assert res.to == [{to_user.name, to_user.email}]
|
assert res.to == [{to_user.name, to_user.email}]
|
||||||
assert res.from == {config[:name], config[:notify_email]}
|
assert res.from == {config[:name], config[:notify_email]}
|
||||||
assert res.reply_to == {reporter.name, reporter.email}
|
|
||||||
assert res.subject == "#{config[:name]} Report"
|
assert res.subject == "#{config[:name]} Report"
|
||||||
|
|
||||||
assert res.html_body ==
|
assert res.html_body ==
|
||||||
@ -34,4 +33,17 @@ defmodule Pleroma.Emails.AdminEmailTest do
|
|||||||
status_url
|
status_url
|
||||||
}\">#{status_url}</li>\n </ul>\n</p>\n\n"
|
}\">#{status_url}</li>\n </ul>\n</p>\n\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "it works when the reporter is a remote user without email" do
|
||||||
|
config = Pleroma.Config.get(:instance)
|
||||||
|
to_user = insert(:user)
|
||||||
|
reporter = insert(:user, email: nil, local: false)
|
||||||
|
account = insert(:user)
|
||||||
|
|
||||||
|
res =
|
||||||
|
AdminEmail.report(to_user, reporter, account, [%{name: "Test", id: "12"}], "Test comment")
|
||||||
|
|
||||||
|
assert res.to == [{to_user.name, to_user.email}]
|
||||||
|
assert res.from == {config[:name], config[:notify_email]}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user