diff --git a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.accept.jinja b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.accept.jinja
index 1b0544f08..7a2610a09 100644
--- a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.accept.jinja
+++ b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.accept.jinja
@@ -2,8 +2,7 @@
{% set community = request.receiver %}
{% set created_by = request.created_by %}
{% set request_id = request.id %}
-{# TODO: Action-based notifications don't pass `message` so this will always be empty #}
-{% set message = notification.context.message | safe if notification.context.message else '' %}
+{# Attention: Action-based notifications don't pass `message`, but a separate comment notification is sent so this is fine. #}
{% set community_title = community.metadata.title %}
{# This email is sent to the requester only so omitted requester's name #}
@@ -20,15 +19,9 @@ and not publicly exposed so ok to refer to it directly for now #}
{%- block html_body -%}
- {{ _("The membership request to join the community '{community_title}' was accepted").format(community_title=community_title) }}
- {% if message %}{{ _(" with the following message:")}}{% endif %}
+ | {{ _("The membership request to join the community '{community_title}' was accepted").format(community_title=community_title) }}.
|
-
- {% if message %}
- "{{message}}" |
- {% endif %}
-
{{ _("Check out the membership request")}} |
@@ -42,16 +35,14 @@ and not publicly exposed so ok to refer to it directly for now #}
{%- endblock html_body %}
{%- block plain_body -%}
-{{ _("The membership request to join the community '{community_title}' was accepted").format(community_title=community_title) }}
-{% if message %}{{ _("with the following message:")}} {{message}}{% endif %}
+{{ _("The membership request to join the community '{community_title}' was accepted").format(community_title=community_title) }}.
{{ _("Check out the membership request:") }} {{ request_link }}
{%- endblock plain_body %}
{# Markdown for Slack/Mattermost/chat #}
{%- block md_body -%}
-{{ _("The membership request to join the community *{community_title}* was accepted").format(community_title=community_title) }}
-{% if message %}{{ _("with the following message:")}} {{ message }}{% endif %}
+{{ _("The membership request to join the community *{community_title}* was accepted").format(community_title=community_title) }}.
[{{ _("Check out the membership request") }}]({{ request_link }})
{%- endblock md_body %}
diff --git a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.cancel.jinja b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.cancel.jinja
index 4ae66a0d4..2ba0ee1f3 100644
--- a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.cancel.jinja
+++ b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.cancel.jinja
@@ -3,7 +3,7 @@
{% set created_by = request.created_by %}
{% set requester_name = created_by.username or created_by.profile.full_name %}
{% set request_id = request.id %}
-{% set message = notification.context.message | safe if notification.context.message else '' %}
+{# Attention: Action-based notifications don't pass `message`, but a separate comment notification is sent so this is fine. #}
{% set community_title = community.metadata.title %}
{# WARNING: this uses a config set by invenio-app-rdm (not a dependency) to at least not hardcode the URL #}
@@ -19,15 +19,9 @@
{%- block html_body -%}
- {{ _("The membership request for '@{requester_name}' to join the community '{community_title}' was cancelled").format(requester_name=requester_name, community_title=community_title) }}
- {% if message %}{{ _(" with the following message:")}}{% endif %}
+ | {{ _("The membership request for '@{requester_name}' to join the community '{community_title}' was cancelled").format(requester_name=requester_name, community_title=community_title) }}.
|
-
- {% if message %}
- "{{message}}" |
- {% endif %}
-
{{ _("Check out the membership request")}} |
@@ -41,16 +35,14 @@
{%- endblock html_body %}
{%- block plain_body -%}
-{{ _("The membership request for '@{requester_name}' to join the community '{community_title}' was cancelled").format(requester_name=requester_name, community_title=community_title) }}
-{% if message %}{{ _(" with the following message:")}} {{ message }}{% endif %}
+{{ _("The membership request for '@{requester_name}' to join the community '{community_title}' was cancelled").format(requester_name=requester_name, community_title=community_title) }}.
{{ _("Check out the membership request:") }} {{ request_link }}
{%- endblock plain_body %}
{# Markdown for Slack/Mattermost/chat #}
{%- block md_body -%}
-{{ _("The membership_request for *@{requester_name}* to join the community *{community_title}* was cancelled").format(requester_name=requester_name, community_title=community_title) }}
-{% if message %}{{ _("with the following message:")}} {{message}}{% endif %}
+{{ _("The membership_request for *@{requester_name}* to join the community *{community_title}* was cancelled").format(requester_name=requester_name, community_title=community_title) }}.
[{{ _("Check out the membership request") }}]({{ request_link }})
{%- endblock md_body %}
diff --git a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.decline.jinja b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.decline.jinja
index a627b24aa..7cf624641 100644
--- a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.decline.jinja
+++ b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.decline.jinja
@@ -2,8 +2,7 @@
{% set community = request.receiver %}
{% set created_by = request.created_by %}
{% set request_id = request.id %}
-{# TODO: Action-based notifications don't pass `message` so this will always be empty #}
-{% set message = notification.context.message | safe if notification.context.message else '' %}
+{# Attention: Action-based notifications don't pass `message`, but a separate notification is sent so this is fine. #}
{% set community_title = community.metadata.title %}
{# This email is sent to the requester only so omitted requester's name #}
@@ -20,15 +19,9 @@ and not publicly exposed so ok to refer to it directly for now #}
{%- block html_body -%}
- {{ _("The membership request to join the community '{community_title}' was declined").format(community_title=community_title) }}
- {% if message %}{{ _(" with the following message:")}}{% endif %}
+ | {{ _("The membership request to join the community '{community_title}' was declined").format(community_title=community_title) }}.
|
-
- {% if message %}
- "{{message}}" |
- {% endif %}
-
{{ _("Check out the membership request")}} |
@@ -42,16 +35,14 @@ and not publicly exposed so ok to refer to it directly for now #}
{%- endblock html_body %}
{%- block plain_body -%}
-{{ _("The membership request to join the community '{community_title}' was declined").format(community_title=community_title) }}
-{% if message %}{{ _("with the following message:")}} {{message}}{% endif %}
+{{ _("The membership request to join the community '{community_title}' was declined").format(community_title=community_title) }}.
{{ _("Check out the membership request:") }} {{ request_link }}
{%- endblock plain_body %}
{# Markdown for Slack/Mattermost/chat #}
{%- block md_body -%}
-{{ _("The membership request to join the community *{community_title}* was declined").format(community_title=community_title) }}
-{% if message %}{{ _("with the following message:")}} {{ message }}{% endif %}
+{{ _("The membership request to join the community *{community_title}* was declined").format(community_title=community_title) }}.
[{{ _("Check out the membership request") }}]({{ request_link }})
{%- endblock md_body %}
diff --git a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.expire.jinja b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.expire.jinja
index 8f9ecb69d..0b9ff8296 100644
--- a/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.expire.jinja
+++ b/invenio_communities/templates/semantic-ui/invenio_notifications/community-membership-request.expire.jinja
@@ -5,7 +5,7 @@
{% set community_title = community.metadata.title %}
{% set requester_name = requester.username or requester.profile.full_name %}
-{# TODO: Can we choose URL based on receiver? #}
+{# TODO: Can we choose URL based on email receiver? #}
{# WARNING: this uses a config set by invenio-app-rdm (not a dependency) to at least not hardcode the URL #}
{# invenio-app-rdm should have been using REQUESTS_ROUTES a config of a dependency however. #}
{% set request_link_path = config.RDM_REQUESTS_ROUTES["community-dashboard-request-details"].lstrip("/") %}
@@ -20,7 +20,7 @@
{%- block html_body -%}
- {{ _("The membership request for '@{requester_name}' to join the community '{community_title}' expired.").format(requester_name=requester_name, community_title=community_title) }} |
+ {{ _("The membership request for '@{requester_name}' to join the community '{community_title}' expired").format(requester_name=requester_name, community_title=community_title) }}. |
{{ _("Check out the membership request")}} |
@@ -35,14 +35,14 @@
{%- endblock html_body %}
{%- block plain_body -%}
-{{ _("The membership request for @{requester_name} to join community '{community_title}' expired.").format(requester_name=requester_name, community_title=community_title) }}
+{{ _("The membership request for @{requester_name} to join community '{community_title}' expired").format(requester_name=requester_name, community_title=community_title) }}.
{{ _("Check out the membership request:") }} {{ request_link }}
{%- endblock plain_body %}
{# Markdown for Slack/Mattermost/chat #}
{%- block md_body -%}
-{{ _("The membership request for *@{requester_name}* to join community *{community_title}* expired.").format(requester_name=requester_name, community_title=community_title) }}
+{{ _("The membership request for *@{requester_name}* to join community *{community_title}* expired").format(requester_name=requester_name, community_title=community_title) }}.
[{{ _("Check out the membership request") }}]({{ request_link }})
{%- endblock md_body %}