diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-03-04 19:55:11 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-03-04 19:55:11 +0700 |
commit | eb84de01439c4ee25f59390e5be4ffa7f36e01b8 (patch) | |
tree | 63c935841bf4063278baff298e00724a2db46794 /lib/pleroma/web/common_api/utils.ex | |
parent | dd5865535eb16f535ff996eb3dec5e947a905268 (diff) | |
download | pleroma-eb84de01439c4ee25f59390e5be4ffa7f36e01b8.tar.gz |
allow users to disable their own account
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index e4b9102c5..60d1185d3 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -17,7 +17,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do # This is a hack for twidere. def get_by_id_or_ap_id(id) do - activity = Repo.get(Activity, id) || Activity.get_create_by_object_ap_id(id) + activity = Activity.get_by_id(id) || Activity.get_create_by_object_ap_id(id) activity && if activity.data["type"] == "Create" do @@ -30,7 +30,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do def get_replied_to_activity(""), do: nil def get_replied_to_activity(id) when not is_nil(id) do - Repo.get(Activity, id) + Activity.get_by_id(id) end def get_replied_to_activity(_), do: nil |