commit: 033618b25e9073c531bd09e2deafff0600cfcf3e
parent 3d42219f12e4249301b54504085fb18a607ed9ad
Author: Lain Soykaf <lain@lain.com>
Date: Mon, 5 Jan 2026 11:57:02 +0400
TransmogrifierTest: Add failing test for EmojiReact url encoding
Diffstat:
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/test/pleroma/web/activity_pub/transmogrifier_test.exs b/test/pleroma/web/activity_pub/transmogrifier_test.exs
@@ -759,6 +759,22 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
)
end
+ test "EmojiReact custom emoji urls are URI encoded" do
+ user = insert(:user, local: true)
+ note_activity = insert(:note_activity)
+
+ {:ok, react_activity} = CommonAPI.react_with_emoji(note_activity.id, user, ":dinosaur:")
+ {:ok, data} = Transmogrifier.prepare_outgoing(react_activity.data)
+
+ assert length(data["tag"]) == 1
+
+ tag = List.first(data["tag"])
+ url = tag["icon"]["url"]
+
+ assert url == "http://localhost:4001/emoji/dino%20walking.gif"
+ assert tag["id"] == "http://localhost:4001/emoji/dino%20walking.gif"
+ end
+
test "it prepares a quote post" do
user = insert(:user)