aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-10-06 14:59:58 +0000
committerkaniini <ariadne@dereferenced.org>2019-10-06 14:59:58 +0000
commit10f4ce848a7a4edd4d420642f1ad9e7fca009f85 (patch)
treeb23321bccbcd7e7686a593d46e62036cd39173fe
parent294e08cb65940ff193d6920e576f56718a5623f4 (diff)
parent2a2d834ff75fc9d2e89ffda392d49f0ad29c45c1 (diff)
downloadpleroma-10f4ce848a7a4edd4d420642f1ad9e7fca009f85.tar.gz
Merge branch 'backport/fix-report-email' into 'maint/1.1'
backport: Use the user.id instead of nickname in report URLs See merge request pleroma/pleroma!1802
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/pleroma/emails/admin_email.ex2
-rw-r--r--test/emails/admin_email_test.exs4
3 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79f867e62..5229fe47a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- ActivityPub: Correct addressing of Undo.
- ActivityPub: Correct addressing of profile update activities.
- Mastodon API: Ensure the `account` field is not empty when rendering Notification entities.
+- Report emails now include functional links to profiles of remote user accounts
### Removed
- ActivityPub: The `/objects/:uuid/likes` endpoint.
diff --git a/lib/pleroma/emails/admin_email.ex b/lib/pleroma/emails/admin_email.ex
index c14be02dd..5a0903c13 100644
--- a/lib/pleroma/emails/admin_email.ex
+++ b/lib/pleroma/emails/admin_email.ex
@@ -17,7 +17,7 @@ defmodule Pleroma.Emails.AdminEmail do
end
defp user_url(user) do
- Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, user.nickname)
+ Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, user.id)
end
def report(to, reporter, account, statuses, comment) do
diff --git a/test/emails/admin_email_test.exs b/test/emails/admin_email_test.exs
index 9e83c73c6..594f03959 100644
--- a/test/emails/admin_email_test.exs
+++ b/test/emails/admin_email_test.exs
@@ -19,8 +19,8 @@ defmodule Pleroma.Emails.AdminEmailTest do
AdminEmail.report(to_user, reporter, account, [%{name: "Test", id: "12"}], "Test comment")
status_url = Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, "12")
- reporter_url = Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, reporter.nickname)
- account_url = Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, account.nickname)
+ reporter_url = Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, reporter.id)
+ account_url = Helpers.o_status_url(Pleroma.Web.Endpoint, :feed_redirect, account.id)
assert res.to == [{to_user.name, to_user.email}]
assert res.from == {config[:name], config[:notify_email]}