formatting
This commit is contained in:
parent
358f88e10a
commit
e82ce2a4b3
|
@ -79,11 +79,7 @@ def render_activities(activities) do
|
||||||
link("Post ##{activity.id} by #{user.nickname}", "/notices/#{activity.id}") <>
|
link("Post ##{activity.id} by #{user.nickname}", "/notices/#{activity.id}") <>
|
||||||
info("#{like_count} likes, #{announcement_count} repeats") <>
|
info("#{like_count} likes, #{announcement_count} repeats") <>
|
||||||
"i\tfake\t(NULL)\t0\r\n" <>
|
"i\tfake\t(NULL)\t0\r\n" <>
|
||||||
info(
|
info(HTML.strip_tags(String.replace(activity.data["object"]["content"], "<br>", "\r")))
|
||||||
HTML.strip_tags(
|
|
||||||
String.replace(activity.data["object"]["content"], "<br>", "\r")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
end)
|
end)
|
||||||
|> Enum.join("i\tfake\t(NULL)\t0\r\n")
|
|> Enum.join("i\tfake\t(NULL)\t0\r\n")
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,8 +39,7 @@ def render("user.json", %{user: user = %User{}} = assigns) do
|
||||||
|
|
||||||
data = %{
|
data = %{
|
||||||
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
||||||
"description" =>
|
"description" => HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
|
||||||
HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
|
|
||||||
"description_html" => HTML.filter_tags(user.bio),
|
"description_html" => HTML.filter_tags(user.bio),
|
||||||
"favourites_count" => 0,
|
"favourites_count" => 0,
|
||||||
"followers_count" => user_info[:follower_count],
|
"followers_count" => user_info[:follower_count],
|
||||||
|
|
Loading…
Reference in New Issue