-
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
feat: Add session state change emails #7196
Conversation
app/api/sessions.py
Outdated
@@ -259,7 +259,7 @@ def before_update_object(self, session, data, view_kwargs): | |||
|
|||
if new_state and new_state != session.state: | |||
# State change detected. Verify that state change is allowed | |||
g.send_email = new_state == 'accepted' or new_state == 'rejected' | |||
g.send_email = new_state in ['accepted', 'rejected', 'confirmed', 'rejected', 'canceled', 'withdrawn'] |
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.
line too long (114 > 90 characters)
"Your session status for the submission {session_name} for {event_name} was changed to \"Withdrawn\".<br/><br/>" | ||
"The status change was done by event organizers. If there are questions about this change please contact the organizers.<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" | ||
"More details about the event are on the event page at {event_link}.<br/><br/>" |
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.
line too long (91 > 90 characters)
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Your session status for the submission {session_name} for {event_name} was changed to \"Withdrawn\".<br/><br/>" | ||
"The status change was done by event organizers. If there are questions about this change please contact the organizers.<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" |
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.
line too long (157 > 90 characters)
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Your session status for the submission {session_name} for {event_name} was changed to \"Withdrawn\".<br/><br/>" | ||
"The status change was done by event organizers. If there are questions about this change please contact the organizers.<br/><br/>" |
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.
line too long (143 > 90 characters)
'subject': 'Withdrawn! Your submission for {event_name} titled {session_name} has been Withdrawn', | ||
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Your session status for the submission {session_name} for {event_name} was changed to \"Withdrawn\".<br/><br/>" |
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.
line too long (124 > 90 characters)
"Unfortunately your submission {session_name} for {event_name} was not accepted. Your session status was changed to \"Rejected\".<br/><br/>" | ||
"The status change was done by event organizers. If there are questions about this change please contact the organizers.<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" | ||
"More details about the event are on the event page at {event_link}.<br/><br/>" |
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.
line too long (91 > 90 characters)
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Unfortunately your submission {session_name} for {event_name} was not accepted. Your session status was changed to \"Rejected\".<br/><br/>" | ||
"The status change was done by event organizers. If there are questions about this change please contact the organizers.<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" |
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.
line too long (157 > 90 characters)
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Unfortunately your submission {session_name} for {event_name} was not accepted. Your session status was changed to \"Rejected\".<br/><br/>" | ||
"The status change was done by event organizers. If there are questions about this change please contact the organizers.<br/><br/>" |
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.
line too long (143 > 90 characters)
'subject': 'Not Accepted. Your submission for {event_name} titled {session_name} was not accepted', | ||
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Unfortunately your submission {session_name} for {event_name} was not accepted. Your session status was changed to \"Rejected\".<br/><br/>" |
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.
line too long (152 > 90 characters)
"<a href='{frontend_link}'>{app_name}</a>", | ||
}, | ||
'rejected': { | ||
'subject': 'Not Accepted. Your submission for {event_name} titled {session_name} was not accepted', |
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.
line too long (111 > 90 characters)
"Your session status for the submission {session_name} for {event_name} was changed to \"Confirmed\". Congratulations!<br/><br/>" | ||
"Your proposal will be scheduled by the event organizers and review team. Please inform the event organizers in case there are any changes to your participation.<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" | ||
"More details about the event are on the event page at {event_link}.<br/><br/>" |
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.
line too long (91 > 90 characters)
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Your session status for the submission {session_name} for {event_name} was changed to \"Confirmed\". Congratulations!<br/><br/>" | ||
"Your proposal will be scheduled by the event organizers and review team. Please inform the event organizers in case there are any changes to your participation.<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" |
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.
line too long (157 > 90 characters)
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Your session status for the submission {session_name} for {event_name} was changed to \"Confirmed\". Congratulations!<br/><br/>" | ||
"Your proposal will be scheduled by the event organizers and review team. Please inform the event organizers in case there are any changes to your participation.<br/><br/>" |
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.
line too long (184 > 90 characters)
'subject': 'Confirmed! Congratulations Your submission for {event_name} titled {session_name} has been Confirmed', | ||
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Your session status for the submission {session_name} for {event_name} was changed to \"Confirmed\". Congratulations!<br/><br/>" |
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.
line too long (141 > 90 characters)
"<a href='{frontend_link}'>{app_name}</a>", | ||
}, | ||
'confirmed': { | ||
'subject': 'Confirmed! Congratulations Your submission for {event_name} titled {session_name} has been 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.
line too long (126 > 90 characters)
'subject': 'Accepted! Congratulations Your submission for {event_name} titled {session_name} has been Accepted', | ||
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"Your session status for the submission {session_name} for {event_name} was changed to \"Accepted\". Congratulations!<br/><br/>" |
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.
line too long (140 > 90 characters)
"<a href='{frontend_link}'>{app_name}</a>", | ||
}, | ||
'accepted': { | ||
'subject': 'Accepted! Congratulations Your submission for {event_name} titled {session_name} has been Accepted', |
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.
line too long (124 > 90 characters)
"We have received your submission {session_name} for {event_name}<br/><br/>" | ||
"Your proposal will be reviewed by the event organizers and review team. The current status of your session is now \"Pending\".<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" | ||
"More details about the event are on the event page at {event_link}.<br/><br/>" |
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.
line too long (91 > 90 characters)
"This is an automatic message from {app_name}.<br/><br/>" | ||
"We have received your submission {session_name} for {event_name}<br/><br/>" | ||
"Your proposal will be reviewed by the event organizers and review team. The current status of your session is now \"Pending\".<br/><br/>" | ||
"You can also check the status and details of your submission on the session page {session_link}. You need to be logged in to view it.<br/><br/>" |
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.
line too long (157 > 90 characters)
'message': "Hello,<br/><br/>" | ||
"This is an automatic message from {app_name}.<br/><br/>" | ||
"We have received your submission {session_name} for {event_name}<br/><br/>" | ||
"Your proposal will be reviewed by the event organizers and review team. The current status of your session is now \"Pending\".<br/><br/>" |
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.
line too long (150 > 90 characters)
Fixes fossasia/open-event-frontend#4604
Fixes #7195