Merge branch 'develop' into fix/csp-mediaproxy-base-url
[akkoma] / lib / pleroma / web / common_api / common_api.ex
index 173353aa5ac363a646a5d56005cb485d4875cd36..5a194910dbaa0ea9839fe2487c07a1bc6518d8ca 100644 (file)
@@ -54,6 +54,9 @@ defmodule Pleroma.Web.CommonAPI do
       content
       |> Formatter.html_escape("text/plain")
       |> Formatter.linkify()
+      |> (fn {text, mentions, tags} ->
+            {String.replace(text, ~r/\r?\n/, "<br>"), mentions, tags}
+          end).()
 
     text
   end
@@ -118,6 +121,7 @@ defmodule Pleroma.Web.CommonAPI do
              object: follow_activity.data["id"],
              type: "Accept"
            }) do
+      Notification.update_notification_type(followed, follow_activity)
       {:ok, follower}
     end
   end