X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fmastodon_api.ex;h=23846b36a0a3101784b2e27358b5de14407c26c3;hb=fc842aa7c78fb0380708dfecf2e7a515f66ec815;hp=fb713d47c90fa65c067968d761fe9f5a8907f654;hpb=64a4c147b1836be8af0c87b23073ed82bb9cf67c;p=akkoma diff --git a/lib/pleroma/web/mastodon_api/mastodon_api.ex b/lib/pleroma/web/mastodon_api/mastodon_api.ex index fb713d47c..23846b36a 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api.ex @@ -41,10 +41,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPI do User.subscribe(follower, followed) end - defp set_subscription(_, {:ok, follower, followed, _}) do + defp set_subscription(false, {:ok, follower, followed, _}) do User.unsubscribe(follower, followed) end + defp set_subscription(_, _), do: {:ok, nil} + @spec get_followers(User.t(), map()) :: list(User.t()) def get_followers(user, params \\ %{}) do user