Merge branch 'stream-follow-updates' into 'develop'
Stream follow updates Closes #2299 See merge request pleroma/pleroma!3183
This commit is contained in:
commit
1436a2fa2d
32 changed files with 270 additions and 155 deletions
|
|
@ -894,7 +894,7 @@ defmodule Pleroma.User do
|
|||
if not ap_enabled?(followed) do
|
||||
follow(follower, followed)
|
||||
else
|
||||
{:ok, follower}
|
||||
{:ok, follower, followed}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -920,11 +920,6 @@ defmodule Pleroma.User do
|
|||
|
||||
true ->
|
||||
FollowingRelationship.follow(follower, followed, state)
|
||||
|
||||
{:ok, _} = update_follower_count(followed)
|
||||
|
||||
follower
|
||||
|> update_following_count()
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -948,11 +943,6 @@ defmodule Pleroma.User do
|
|||
case get_follow_state(follower, followed) do
|
||||
state when state in [:follow_pending, :follow_accept] ->
|
||||
FollowingRelationship.unfollow(follower, followed)
|
||||
{:ok, followed} = update_follower_count(followed)
|
||||
|
||||
{:ok, follower} = update_following_count(follower)
|
||||
|
||||
{:ok, follower, followed}
|
||||
|
||||
nil ->
|
||||
{:error, "Not subscribed!"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue