forked from AkkomaGang/akkoma
Remove Reply-To from report emails
This commit is contained in:
parent
f7fc902c29
commit
96028cd585
3 changed files with 15 additions and 2 deletions
|
@ -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
|
||||
- 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.
|
||||
- Report email not being sent to admins when the reporter is a remote user
|
||||
|
||||
### Added
|
||||
- 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
|
||||
- Emoji: Remove longfox emojis.
|
||||
- Remove `Reply-To` header from report emails for admins.
|
||||
|
||||
## [1.0.1] - 2019-07-14
|
||||
### Security
|
||||
|
|
|
@ -63,7 +63,6 @@ def report(to, reporter, account, statuses, comment) do
|
|||
new()
|
||||
|> to({to.name, to.email})
|
||||
|> from({instance_name(), instance_notify_email()})
|
||||
|> reply_to({reporter.name, reporter.email})
|
||||
|> subject("#{instance_name()} Report")
|
||||
|> html_body(html_body)
|
||||
end
|
||||
|
|
|
@ -24,7 +24,6 @@ test "build report email" do
|
|||
|
||||
assert res.to == [{to_user.name, to_user.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.html_body ==
|
||||
|
@ -34,4 +33,17 @@ test "build report email" do
|
|||
status_url
|
||||
}\">#{status_url}</li>\n </ul>\n</p>\n\n"
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue