Mastodon API: do not create a following relationship if the corresponding follow request doesn't exist when calling POST /api/v1/follow_requests/:id/authorize
This commit is contained in:
parent
e55876409b
commit
66a8e1312d
3 changed files with 11 additions and 2 deletions
|
|
@ -697,6 +697,14 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
assert Repo.get(Activity, follow_activity_two.id).data["state"] == "reject"
|
||||
assert Repo.get(Activity, follow_activity_three.id).data["state"] == "pending"
|
||||
end
|
||||
|
||||
test "doesn't create a following relationship if the corresponding follow request doesn't exist" do
|
||||
user = insert(:user, locked: true)
|
||||
not_follower = insert(:user)
|
||||
CommonAPI.accept_follow_request(not_follower, user)
|
||||
|
||||
assert Pleroma.FollowingRelationship.following?(not_follower, user) == false
|
||||
end
|
||||
end
|
||||
|
||||
describe "vote/3" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue