-
Notifications
You must be signed in to change notification settings - Fork 351
[ENG-9793] update unregistered contributor notifications and email templates #11462
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
base: feature/notification-refactor-p2-s
Are you sure you want to change the base?
Conversation
8d450fc to
4f652a2
Compare
cslzchen
left a comment
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.
Great work on the fix + the templates updates 🎆 I added a few notes and will review again when unit tests are fixed.
| log=True, | ||
| save=False, | ||
| notification_type=NotificationType.Type.NODE_CONTRIBUTOR_ADDED_DEFAULT | ||
| notification_type=False, |
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.
False: we don't want user to receive any emails
None: we will just wait for the caller to provide the template
| if isinstance(self, AbstractNode): | ||
| notification_type = NotificationType.Type.USER_INVITE_DEFAULT | ||
| elif isinstance(self, Preprint): | ||
| if self.provider.is_default: | ||
| notification_type = NotificationType.Type.USER_INVITE_OSF_PREPRINT | ||
| else: | ||
| notification_type = NotificationType.Type.PROVIDER_USER_INVITE_PREPRINT | ||
| elif isinstance(self, DraftRegistration): | ||
| notification_type = NotificationType.Type.USER_INVITE_DRAFT_REGISTRATION |
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.
Let's remove "unused" comments in the types definition for these ones.
| return | ||
|
|
||
| claim_url = None | ||
| if not contributor.is_confirmed: |
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.
Note : looks like is_registered , is_confirmed, date_registered and date_confirmed are the same for this check. Let's keep is_confirmed here.
84ab6de to
7309cda
Compare
Purpose
update unregistered contributor notifications and email templates
Changes
See diff
QA Notes
N/A
Documentation
N/A
Side Effects
N/A
Ticket
https://openscience.atlassian.net/browse/ENG-9793