mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 12:29:32 +02:00
Fix #743: Do not send notification when rejecting a follow on a local library
This commit is contained in:
parent
9dcfc20571
commit
3d94eddcfc
3 changed files with 9 additions and 4 deletions
|
@ -25,6 +25,7 @@ from . import utils
|
||||||
def update_follow(follow, approved):
|
def update_follow(follow, approved):
|
||||||
follow.approved = approved
|
follow.approved = approved
|
||||||
follow.save(update_fields=["approved"])
|
follow.save(update_fields=["approved"])
|
||||||
|
if approved:
|
||||||
routes.outbox.dispatch({"type": "Accept"}, context={"follow": follow})
|
routes.outbox.dispatch({"type": "Accept"}, context={"follow": follow})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,9 +123,12 @@ def test_user_can_accept_or_reject_own_follows(
|
||||||
|
|
||||||
assert follow.approved is expected
|
assert follow.approved is expected
|
||||||
|
|
||||||
|
if action == "accept":
|
||||||
mocked_dispatch.assert_called_once_with(
|
mocked_dispatch.assert_called_once_with(
|
||||||
{"type": "Accept"}, context={"follow": follow}
|
{"type": "Accept"}, context={"follow": follow}
|
||||||
)
|
)
|
||||||
|
if action == "reject":
|
||||||
|
mocked_dispatch.assert_not_called()
|
||||||
|
|
||||||
|
|
||||||
def test_user_can_list_inbox_items(factories, logged_in_api_client):
|
def test_user_can_list_inbox_items(factories, logged_in_api_client):
|
||||||
|
|
1
changes/changelog.d/743.bugfig
Normal file
1
changes/changelog.d/743.bugfig
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Do not send notification when rejecting a follow on a local library (#743)
|
Loading…
Add table
Add a link
Reference in a new issue