Avoid adding the same notification twice to a sender
This commit is contained in:
parent
c8550431e0
commit
27b9f46f30
@ -220,7 +220,8 @@ def SendNotifications():
|
||||
if user["notify_email"]:
|
||||
if user["user_email"] not in email_dict:
|
||||
email_dict[user["user_email"]] = []
|
||||
email_dict[user["user_email"]].append(notification)
|
||||
if notification not in email_dict[user["user_email"]]:
|
||||
email_dict[user["user_email"]].append(notification)
|
||||
if user["notify_whatsapp"]:
|
||||
# TBD
|
||||
pass
|
||||
@ -236,7 +237,8 @@ def SendNotifications():
|
||||
if user["notify_email"] and notification.type in user_notifications:
|
||||
if user["user_email"] not in email_dict:
|
||||
email_dict[user["user_email"]] = []
|
||||
email_dict[user["user_email"]].append(notification)
|
||||
if notification not in email_dict[user["user_email"]]:
|
||||
email_dict[user["user_email"]].append(notification)
|
||||
if user["notify_whatsapp"] and notification.type in user_notifications:
|
||||
# TBD
|
||||
pass
|
||||
|
||||
Loading…
Reference in New Issue
Block a user