Merge branch 'develop' of https://git.youjo.love/fox/youjo-be into develop

This commit is contained in:
Chizu 2023-03-17 04:25:15 +09:00
commit 2c89802c82
2 changed files with 17 additions and 3 deletions

View file

@ -90,8 +90,10 @@ defmodule Pleroma.Web.ActivityPub.Builder do
Enum.find(
existing_reactions,
fn [name, _, url] ->
url = URI.parse(url)
url.host == instance && name == emoji_code
if url != nil do
url = URI.parse(url)
url.host == instance && name == emoji_code
end
end
)

View file

@ -76,7 +76,12 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionControllerTest do
note =
insert(:note,
user: user,
data: %{"reactions" => [["wow", [other_user.ap_id], "https://remote/emoji/wow"]]}
data: %{
"reactions" => [
["👍", [other_user.ap_id], nil],
["wow", [other_user.ap_id], "https://remote/emoji/wow"]
]
}
)
activity = insert(:note_activity, note: note, user: user)
@ -89,6 +94,13 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionControllerTest do
|> json_response(200)
assert result["pleroma"]["emoji_reactions"] == [
%{
"account_ids" => [other_user.id],
"count" => 1,
"me" => false,
"name" => "👍",
"url" => nil
},
%{
"name" => "wow@remote",
"count" => 2,