Merge branch 'more-emoji-likes' into 'develop'

More emoji likes

Closes #3364

See merge request pleroma/pleroma!4342
This commit is contained in:
lain 2025-03-20 09:12:09 +00:00
commit 254b31bf1c
6 changed files with 186 additions and 1 deletions

View file

@ -492,6 +492,19 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
}
# Rewrite misskey likes into EmojiReacts
defp handle_incoming_normalized(
%{
"type" => "Like",
"content" => content
} = data,
options
)
when is_binary(content) do
data
|> Map.put("type", "EmojiReact")
|> handle_incoming_normalized(options)
end
defp handle_incoming_normalized(
%{
"type" => "Like",
@ -500,7 +513,6 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
options
) do
data
|> Map.put("type", "EmojiReact")
|> Map.put("content", @misskey_reactions[reaction] || reaction)
|> handle_incoming_normalized(options)
end

View file

@ -122,6 +122,10 @@ defmodule Pleroma.Web.Federator do
Logger.debug("Unhandled actor #{actor}, #{inspect(e)}")
{:error, e}
{:reject, reason} = e ->
Logger.debug("Rejected by MRF: #{inspect(reason)}")
{:error, e}
e ->
# Just drop those for now
Logger.debug(fn -> "Unhandled activity\n" <> Jason.encode!(params, pretty: true) end)