Fix most User tests.
[akkoma] / lib / pleroma / formatter.ex
index dd971df9b98d3b02694565633794f94f507723a6..1a5c07c8a61e73edba5ac88297090fd69aa28cbe 100644 (file)
@@ -29,8 +29,6 @@ defmodule Pleroma.Formatter do
     |> Enum.filter(fn {_match, user} -> user end)
   end
 
-  @instance Application.get_env(:pleroma, :instance)
-
   def emojify(text) do
     emojify(text, Emoji.get_all())
   end
@@ -118,8 +116,8 @@ defmodule Pleroma.Formatter do
       subs ++
         Enum.map(mentions, fn {match, %User{ap_id: ap_id, info: info}, uuid} ->
           ap_id =
-            if is_binary(info["source_data"]["url"]) do
-              info["source_data"]["url"]
+            if is_binary(info.source_data["url"]) do
+              info.source_data["url"]
             else
               ap_id
             end