X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fcommon_api%2Futils.ex;h=123107b56441a216c8589f29dcd10ce3978d855f;hb=1d17082ab2523eb75ee0ca4a49e45da0d0edabd7;hp=208677bd755857f7b31af1dc113123a02be10839;hpb=d3f9e6f6fed382ede8e314c370c21e84a119f65a;p=akkoma diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 208677bd7..123107b56 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -5,12 +5,15 @@ defmodule Pleroma.Web.CommonAPI.Utils do alias Calendar.Strftime alias Comeonin.Pbkdf2 - alias Pleroma.{Activity, Formatter, Object, Repo} + alias Pleroma.Activity + alias Pleroma.Formatter + alias Pleroma.Object + alias Pleroma.Repo alias Pleroma.User alias Pleroma.Web - alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.Endpoint alias Pleroma.Web.MediaProxy + alias Pleroma.Web.ActivityPub.Utils # This is a hack for twidere. def get_by_id_or_ap_id(id) do @@ -95,7 +98,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)