Fix order of args for show_reblogs/2

This commit is contained in:
Mark Felder 2024-07-22 19:19:21 -04:00
parent 3f4f567c9c
commit 12f498bc0d
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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