blob: 91884c3dd217c36d8d97cddd67370a545477961d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# The second I figure out how to get this out of the UI, that's gone too.
# What the hell is this, fucking Github? Facebook?
# Fuck EmojiReaction. Fuck it completely.
# ...Unless it lets you use the custom emojis (which are fun) instead of
# the stupid Unicode Consortium ones (which are terrible), in which case
# I'll get rid of this policy.
defmodule Pleroma.Web.ActivityPub.MRF.EmojiReactionsAreRetarded do
require Logger
@behaviour Pleroma.Web.ActivityPub.MRF.Policy
@impl true
def filter(%{"type" => "EmojiReact"} = message) do
Logger.info("FUCK EMOJI REACTIONS: #{inspect(message)}")
message = message
|> Map.put("type", "Like")
|> Map.drop(["content"])
#{:reject, message}
{:ok, message}
end
@impl true
def filter(object), do: {:ok, object}
@impl true
def describe, do: {:ok, %{}}
end
|