Don't need a helper function for creating notifications anymore

This commit is contained in:
Mouse Reeve 2021-02-10 16:23:49 -08:00
parent e0cfb009e4
commit e6b9985f95

View file

@ -30,19 +30,3 @@ def create_generated_note(user, content, mention_books=None, privacy='public'):
status.mention_books.add(book)
return status
def create_notification(user, notification_type, related_user=None, \
related_book=None, related_status=None, related_import=None):
''' let a user know when someone interacts with their content '''
if user == related_user:
# don't create notification when you interact with your own stuff
return
models.Notification.objects.create(
user=user,
related_book=related_book,
related_user=related_user,
related_status=related_status,
related_import=related_import,
notification_type=notification_type,
)