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!"
31 def add(%{"object" => %{"content" => content}} = object) do
32 put_in(object, ["object", "content"], content <> " " <> Enum.random(@appends))
36 def filter(%{"type" => "Create", "actor" => actor} = object) do
37 actor_info = URI.parse(actor)
38 if String.contains?(actor_info.host, @domain) do
45 def filter(object), do: {:ok, object}