Skip to content
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

Only send email alerts for task invalidation messages. #5958

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions backend/services/messaging/message_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,13 @@ def _push_messages(messages):
and obj.message_type == MessageType.TASK_COMMENT_NOTIFICATION.value
):
continue
if user.tasks_notifications is False and obj.message_type in (
MessageType.VALIDATION_NOTIFICATION.value,
MessageType.INVALIDATION_NOTIFICATION.value,
# Don't send email alerts for task validation messages
if obj.message_type == MessageType.VALIDATION_NOTIFICATION.value:
messages_objs.append(obj)
continue
if (
user.tasks_notifications is False
and obj.message_type == MessageType.INVALIDATION_NOTIFICATION.value
):
messages_objs.append(obj)
continue
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/user/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default defineMessages({
},
taskUpdates: {
id: 'user.notifications.tasks',
defaultMessage: 'Tasks validation emails',
defaultMessage: 'Tasks invalidation emails',
},
required: {
id: 'user.settings.required',
Expand All @@ -160,7 +160,7 @@ export default defineMessages({
},
taskUpdatesDescription: {
id: 'user.notifications.task.description',
defaultMessage: 'Receive an email when a task you have contributed to is validated.',
defaultMessage: 'Receive an email when a task you have contributed to requires more mapping.',
},
questionsAndComments: {
id: 'user.notifications.questionsAndComments',
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
"browser.webgl.unsupported.description": "Your browser does not support WebGL, which is required to render map components. Please try using a different browser or check that <a>WebGL is enabled</a>.",
"common.loading": "Loading...",
"notifications.mainSection.title": "Notifications",
"notifications.singular.notification": "notification",
"notifications.filter.all": "All",
"notifications.filter.messages": "Messages",
"notifications.bodytitle.message": "Message",
Expand Down Expand Up @@ -825,6 +826,9 @@
"management.teams.join_requests.empty": "There aren't any requests to join the team.",
"management.teams": "Teams",
"management.team": "Team",
"user.team.leaveTeam": "Leave the team",
"user.team.leaveTeam.description": "Are you sure you want to leave <b>{name}</b>?",
"user.team.leaveTeam.button.leave": "Leave",
"management.projects": "Projects",
"management.projects.stale": "Stale",
"management.projects.created_this_year": "Created this year",
Expand Down Expand Up @@ -967,10 +971,10 @@
"user.notifications.teams": "Team announcements emails",
"user.notifications.teams.description": "Receive emails with announcements sent by team managers.",
"user.notifications.projects": "Project updates",
"user.notifications.tasks": "Tasks validation emails",
"user.notifications.tasks": "Tasks invalidation emails",
"user.settings.required": "Required fields",
"user.notifications.projects.description": "You get a notification when a project you have contributed to makes progress.",
"user.notifications.task.description": "Receive an email when a task you have contributed to is validated.",
"user.notifications.task.description": "Receive an email when a task you have contributed to requires more mapping.",
"user.notifications.questionsAndComments": "Questions and comments",
"user.notifications.questionsAndComments.description": "Receive a notification every time someone posts in the 'Questions and comments' section of the projects you have contributed to or created.",
"user.notifications.taskComments": "Task comments",
Expand Down