activitypub utils: fix recipient check when the message is unaddressed (mastodon)
[akkoma] / lib / pleroma / gopher / server.ex
index 97a1dea77592ebb148c4ad876ffae5fb03d05245..d34037f4f69f7c05f47a098d06b057e248f7e65e 100644 (file)
@@ -35,6 +35,7 @@ defmodule Pleroma.Gopher.Server.ProtocolHandler do
   alias Pleroma.User
   alias Pleroma.Activity
   alias Pleroma.Repo
+  alias Pleroma.HTML
 
   @instance Application.get_env(:pleroma, :instance)
   @gopher Application.get_env(:pleroma, :gopher)
@@ -78,11 +79,7 @@ defmodule Pleroma.Gopher.Server.ProtocolHandler do
       link("Post ##{activity.id} by #{user.nickname}", "/notices/#{activity.id}") <>
         info("#{like_count} likes, #{announcement_count} repeats") <>
         "i\tfake\t(NULL)\t0\r\n" <>
-        info(
-          HtmlSanitizeEx.strip_tags(
-            String.replace(activity.data["object"]["content"], "<br>", "\r")
-          )
-        )
+        info(HTML.strip_tags(String.replace(activity.data["object"]["content"], "<br>", "\r")))
     end)
     |> Enum.join("i\tfake\t(NULL)\t0\r\n")
   end