Add 'notifying' to relationship for compatibility with Mastodon
[akkoma] / lib / pleroma / web / mastodon_api / mastodon_api.ex
index fb713d47c90fa65c067968d761fe9f5a8907f654..23846b36a0a3101784b2e27358b5de14407c26c3 100644 (file)
@@ -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