Don't let the user unfollow their own account.

This commit is contained in:
eal 2017-11-20 01:21:53 +02:00
commit 4db5954786
2 changed files with 10 additions and 1 deletions

View file

@ -167,7 +167,7 @@ defmodule Pleroma.User do
def unfollow(%User{} = follower, %User{} = followed) do
ap_followers = followed.follower_address
if following?(follower, followed) do
if following?(follower, followed) and follower.ap_id != followed.ap_id do
following = follower.following
|> List.delete(ap_followers)