-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Send after event emails and notifs to unique receivers #7126
fix: Send after event emails and notifs to unique receivers #7126
Conversation
Codecov Report
@@ Coverage Diff @@
## development #7126 +/- ##
===============================================
- Coverage 62.84% 62.79% -0.06%
===============================================
Files 262 262
Lines 13011 13023 +12
===============================================
+ Hits 8177 8178 +1
- Misses 4834 4845 +11
Continue to review full report at Codecov.
|
app/api/helpers/scheduled_jobs.py
Outdated
send_notif_after_event(organizer.user, event.name) | ||
if owner: | ||
send_email_after_event(owner.user.email, event.name, frontend_url) | ||
unique_emails.add(owner.user.email) | ||
send_notif_after_event(owner.user, event.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with notification
Change in all places where repeatedly sending mails |
app/api/helpers/scheduled_jobs.py
Outdated
@@ -54,18 +54,23 @@ def send_after_event_mail(): | |||
frontend_url = get_settings()['frontend_url'] | |||
if current_time > event.ends_at and time_difference_minutes < 1440: | |||
unique_emails = set() | |||
user_objects = list() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user_objects = list() | |
user_objects = [] |
app/api/helpers/utilities.py
Outdated
This will return a dict containing unique keys | ||
mapped to the object which contains that key. | ||
""" | ||
mapped_dict = dict() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapped_dict = dict() | |
mapped_dict = {} |
…server into issue-several-emails
Fixes #6731
Short description of what this resolves:
Multiple emails can be sent if the same user is owner, speaker or organizer which is wrong. Only single email should be sent in that case.
Changes proposed in this pull request:
Send after event emails to unique email ids only by creating a
set
of unique emails.Checklist
development
branch.