1 defmodule Pleroma.Web.ActivityPub.MRF.GABRewritePolicy do
2 @moduledoc "Adds stupid quotes to gab users"
3 @behaviour Pleroma.Web.ActivityPub.MRF
6 "Sent from AOL Mobile Mail",
7 "John had surgery Friday and he's with the lord now.",
8 "Lovely pics as alway, Janice. I have terminal brain cancer.",
10 "I DID NOT POST THAT! SOMEONE HAS HACKED MY ACCOUNT",
12 "Just got back from the doctor. I have Ebola. See you at church on Sunday!",
14 "Are you my grandson?",
15 "http://m.facebook.com",
16 "WISH GOD WOULD TAKE ME.",
17 "YOU SURE ARE A LONG BABY",
19 "THIS EMAIL IS INTENDED FOR THE RECIPIENT ONLY. PLEASE THINK ABOUT THE ENVIRONMENT BEFORE YOU PRINT THIS MESSAGE",
20 "AC/DC is my favourite band",
24 "My 49 year old son, Shane, died this morning.",
27 "price for apple sauce at walmart",
28 "no SWEARING on my timeline!",
29 "MILK TRUK JUST ARRIVE",
30 "Also my catheter bag is full.",
31 "Go finish your yoghurt",
32 "I am going to slap your mouth grandson."
35 def add(%{"object" => %{"content" => content}} = object) do
36 put_in(object, ["object", "content"], content <> " " <> Enum.random(@appends))
40 def describe, do: {:ok, %{}}
43 def filter(%{"type" => "Create", "actor" => actor} = object) do
44 actor_info = URI.parse(actor)
45 if String.contains?(actor_info.host, @domain) do
52 def filter(object), do: {:ok, object}