mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-01-10 17:25:26 +00:00
BBS: put a new line for each HTML break in an activity
Otherwise it would just put each line on the first one, which is not really readable
This commit is contained in:
parent
b128e1d6c5
commit
33ced2c2ed
1 changed files with 7 additions and 2 deletions
|
@ -42,9 +42,14 @@ defmodule Pleroma.BBS.Handler do
|
||||||
|
|
||||||
def puts_activity(activity) do
|
def puts_activity(activity) do
|
||||||
status = Pleroma.Web.MastodonAPI.StatusView.render("show.json", %{activity: activity})
|
status = Pleroma.Web.MastodonAPI.StatusView.render("show.json", %{activity: activity})
|
||||||
|
|
||||||
IO.puts("-- #{status.id} by #{status.account.display_name} (#{status.account.acct})")
|
IO.puts("-- #{status.id} by #{status.account.display_name} (#{status.account.acct})")
|
||||||
IO.puts(status.content |> HTML.strip_tags() |> HtmlEntities.decode())
|
|
||||||
IO.puts("")
|
status.content
|
||||||
|
|> String.split("<br/>")
|
||||||
|
|> Enum.map(&HTML.strip_tags/1)
|
||||||
|
|> Enum.map(&HtmlEntities.decode/1)
|
||||||
|
|> Enum.map(&IO.puts/1)
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_command(state, "help") do
|
def handle_command(state, "help") do
|
||||||
|
|
Loading…
Reference in a new issue