mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-14 04:52:17 +00:00
Fix order of args for show_reblogs/2
This commit is contained in:
parent
3f4f567c9c
commit
12f498bc0d
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue