X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fformatter.ex;h=5b03e9aeb7b469903d12284d5e096fc3df722b8e;hb=ab98c92d86f91b0c83f482e002e4a518b93f65ca;hp=26bb17377094340d69a0280086cc146ee4e85f83;hpb=fe2759bc9f2dad044b49f4954693ac09f9368041;p=akkoma
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index 26bb17377..5b03e9aeb 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -114,10 +114,10 @@ defmodule Pleroma.Formatter do
subs =
subs ++
- Enum.map(mentions, fn {match, %User{ap_id: ap_id, info: info}, uuid} ->
+ Enum.map(mentions, fn {match, %User{id: id, 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
@@ -125,7 +125,7 @@ defmodule Pleroma.Formatter do
short_match = String.split(match, "@") |> tl() |> hd()
{uuid,
- "@#{short_match}"}
+ "@#{short_match}"}
end)
{subs, uuid_text}
@@ -147,7 +147,11 @@ defmodule Pleroma.Formatter do
subs =
subs ++
Enum.map(tags, fn {tag_text, tag, uuid} ->
- url = "#{tag_text}"
+ url =
+ "#{
+ tag_text
+ }"
+
{uuid, url}
end)