Fix #743: Do not send notification when rejecting a follow on a local library

This commit is contained in:
Eliot Berriot 2019-03-07 12:09:45 +01:00
parent 9dcfc20571
commit 3d94eddcfc
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
3 changed files with 9 additions and 4 deletions

View file

@ -25,7 +25,8 @@ from . import utils
def update_follow(follow, approved):
follow.approved = approved
follow.save(update_fields=["approved"])
routes.outbox.dispatch({"type": "Accept"}, context={"follow": follow})
if approved:
routes.outbox.dispatch({"type": "Accept"}, context={"follow": follow})
class LibraryFollowViewSet(