Stash
[akkoma] / lib / pleroma / web / common_api / utils.ex
index 208677bd755857f7b31af1dc113123a02be10839..e50d63d7753652c4646abc93d920bbf73e21a131 100644 (file)
@@ -6,11 +6,9 @@ defmodule Pleroma.Web.CommonAPI.Utils do
   alias Calendar.Strftime
   alias Comeonin.Pbkdf2
   alias Pleroma.{Activity, Formatter, Object, Repo}
-  alias Pleroma.User
-  alias Pleroma.Web
+  alias Pleroma.{User, Web}
+  alias Pleroma.Web.{Endpoint, MediaProxy}
   alias Pleroma.Web.ActivityPub.Utils
-  alias Pleroma.Web.Endpoint
-  alias Pleroma.Web.MediaProxy
 
   # This is a hack for twidere.
   def get_by_id_or_ap_id(id) do
@@ -95,7 +93,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
   def make_context(%Activity{data: %{"context" => context}}), do: context
   def make_context(_), do: Utils.generate_context_id()
 
-  def maybe_add_attachments(text, _attachments, _no_links = true), do: text
+  def maybe_add_attachments(text, _attachments, true = _no_links), do: text
 
   def maybe_add_attachments(text, attachments, _no_links) do
     add_attachments(text, attachments)