summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-07-29 12:55:43 -0400
committertusooa <tusooa@kazv.moe>2023-10-16 21:35:25 -0400
commitb748efe66a099b66300f2beda42f5639911bab4a (patch)
treef0bc0b4a83f4c129bd2ecaf0e800cee4466d969a /test
parent340c8812963a71f5f04b12a4c540bad3871f87fd (diff)
downloadpleroma-b748efe66a099b66300f2beda42f5639911bab4a.tar.gz
pleroma-b748efe66a099b66300f2beda42f5639911bab4a.zip
Fix mentioning punycode domains when using Markdown
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/common_api_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index a98b16d4b..b21dd4e23 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -843,6 +843,18 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: public.id})
{:ok, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: public.id})
end
+
+ test "it properly mentions punycode domain" do
+ user = insert(:user)
+
+ _mentioned_user =
+ insert(:user, ap_id: "https://xn--i2raa.com/users/yyy", nickname: "yyy@xn--i2raa.com")
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{status: "hey @yyy@xn--i2raa.com", content_type: "text/markdown"})
+
+ assert "https://xn--i2raa.com/users/yyy" in Object.normalize(activity).data["to"]
+ end
end
describe "reactions" do