ReactToLike: add missing emojis, make the log clear

This commit is contained in:
Sam Therapy 2022-03-19 18:27:44 +01:00
parent 5e7e56e305
commit 05facac1a4
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD

View file

@ -11,12 +11,11 @@ defmodule Pleroma.Web.ActivityPub.MRF.ChangeReactstoLikes do
@impl true
@spec filter(any) :: {:ok, any}
def filter(%{"type" => "EmojiReact"} = object) do
Logger.warn("#{inspect(object)}")
test = object["content"]
react = object["content"]
# TODO: make this pull from config
if test in ["👍", "❤️", "😆", "😮", "😢", "😩", "😭", ""] do
Logger.warn("MRF.ChangeReactstoLikes: Changing #{inspect(test)} to a Favourite")
if react in ["👍", "👎", "❤️", "😆", "😮", "😢", "😩", "😭", "🔥", ""] do
Logger.info("MRF.ChangeReactstoLikes: Changing #{inspect(react)} to a Like")
object =
object