mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2024-11-20 05:49:54 +01:00
Merge branch 'develop' of https://git.youjo.love/fox/youjo-be into develop
This commit is contained in:
commit
2c89802c82
2 changed files with 17 additions and 3 deletions
|
@ -90,9 +90,11 @@ defmodule Pleroma.Web.ActivityPub.Builder do
|
|||
Enum.find(
|
||||
existing_reactions,
|
||||
fn [name, _, url] ->
|
||||
if url != nil do
|
||||
url = URI.parse(url)
|
||||
url.host == instance && name == emoji_code
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
if matching_reaction do
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue