summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/common_api.ex2
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api.ex12
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/pleroma/web/common_api.ex b/lib/pleroma/web/common_api.ex
index 1ed905d6c..921e414c3 100644
--- a/lib/pleroma/web/common_api.ex
+++ b/lib/pleroma/web/common_api.ex
@@ -130,7 +130,7 @@ defmodule Pleroma.Web.CommonAPI do
if activity.data["state"] == "reject" do
{:error, :rejected}
else
- {:ok, follower, followed, activity}
+ {:ok, followed, follower, activity}
end
end
end
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api.ex b/lib/pleroma/web/mastodon_api/mastodon_api.ex
index 6dcbfb097..c9e045d23 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api.ex
@@ -18,10 +18,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPI do
if not User.following?(follower, followed) do
CommonAPI.follow(followed, follower)
else
- {:ok, follower, followed, nil}
+ {:ok, followed, follower, nil}
end
- with {:ok, follower, _followed, _} <- result do
+ with {:ok, _followed, follower, _} <- result do
options = cast_params(params)
set_reblogs_visibility(options[:reblogs], result)
set_subscription(options[:notify], result)
@@ -29,19 +29,19 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPI do
end
end
- defp set_reblogs_visibility(false, {:ok, follower, followed, _}) do
+ defp set_reblogs_visibility(false, {:ok, followed, follower, _}) do
CommonAPI.hide_reblogs(followed, follower)
end
- defp set_reblogs_visibility(_, {:ok, follower, followed, _}) do
+ defp set_reblogs_visibility(_, {:ok, followed, follower, _}) do
CommonAPI.show_reblogs(followed, follower)
end
- defp set_subscription(true, {:ok, follower, followed, _}) do
+ defp set_subscription(true, {:ok, followed, follower, _}) do
User.subscribe(follower, followed)
end
- defp set_subscription(false, {:ok, follower, followed, _}) do
+ defp set_subscription(false, {:ok, followed, follower, _}) do
User.unsubscribe(follower, followed)
end