mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Don't need a helper function for creating notifications anymore
This commit is contained in:
parent
e0cfb009e4
commit
e6b9985f95
1 changed files with 0 additions and 16 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue