commit: 12f498bc0d996ccdacf7769d57b96b1c2ecabdb3
parent 3f4f567c9cbc0182eb99ec951a6088bfc5bb57d5
Author: Mark Felder <feld@feld.me>
Date: Mon, 22 Jul 2024 19:19:21 -0400
Fix order of args for show_reblogs/2
Diffstat:
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/pleroma/web/common_api.ex b/lib/pleroma/web/common_api.ex
@@ -692,7 +692,7 @@ defmodule Pleroma.Web.CommonAPI do
end
@spec show_reblogs(User.t(), User.t()) :: {:ok, any()} | {:error, any()}
- def show_reblogs(%User{} = user, %User{} = target) do
+ def show_reblogs(%User{} = target, %User{} = user) do
UserRelationship.delete_reblog_mute(user, target)
end
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api.ex b/lib/pleroma/web/mastodon_api/mastodon_api.ex
@@ -34,7 +34,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPI do
end
defp set_reblogs_visibility(_, {:ok, follower, followed, _}) do
- CommonAPI.show_reblogs(follower, followed)
+ CommonAPI.show_reblogs(followed, follower)
end
defp set_subscription(true, {:ok, follower, followed, _}) do
diff --git a/test/pleroma/web/activity_pub/activity_pub_test.exs b/test/pleroma/web/activity_pub/activity_pub_test.exs
@@ -1372,7 +1372,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
user = insert(:user)
booster = insert(:user)
{:ok, _reblog_mute} = CommonAPI.hide_reblogs(booster, user)
- {:ok, _reblog_mute} = CommonAPI.show_reblogs(user, booster)
+ {:ok, _reblog_mute} = CommonAPI.show_reblogs(booster, user)
{:ok, activity} = CommonAPI.repeat(activity.id, booster)
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
@@ -1411,7 +1411,7 @@ defmodule Pleroma.Web.CommonAPITest do
test "remove a reblog mute", %{muter: muter, muted: muted} do
{:ok, _reblog_mute} = CommonAPI.hide_reblogs(muted, muter)
- {:ok, _reblog_mute} = CommonAPI.show_reblogs(muter, muted)
+ {:ok, _reblog_mute} = CommonAPI.show_reblogs(muted, muter)
assert User.showing_reblogs?(muter, muted) == true
end