From e822f7881c4ca8da3fff6ff33c38ccefed204813 Mon Sep 17 00:00:00 2001 From: Aleksandar Date: Thu, 15 Feb 2024 10:07:25 +0100 Subject: [PATCH 1/2] Preserve newlines in messages. --- service/package-lock.json | 14 +++++++------- service/package.json | 4 ++-- .../templates/_layouts/email-transactional.html | 3 +++ service/src/templates/comment.reply.js | 3 +-- .../communication.comment.mention.organization.js | 6 +++--- .../communication.comment.mention.user.js | 6 +++--- ...munication.community.leads.message.recipient.js | 9 ++++----- ...communication.community.leads.message.sender.js | 6 +++--- ...communication.organization.message.recipient.js | 6 +++--- .../communication.organization.message.sender.js | 6 +++--- .../communication.user.message.recipient.js | 5 +---- .../templates/communication.user.message.sender.js | 2 +- ...ommunity.external.invitation.created.invitee.js | 2 +- ...ommunity.external.invitation.created.inviter.js | 2 +- .../community.invitation.created.invitee.js | 2 +- 15 files changed, 37 insertions(+), 39 deletions(-) diff --git a/service/package-lock.json b/service/package-lock.json index e34cda0d..4cc0b8aa 100644 --- a/service/package-lock.json +++ b/service/package-lock.json @@ -9,7 +9,7 @@ "version": "0.15.1", "license": "EUPL-1.2", "dependencies": { - "@alkemio/client-lib": "^0.25.0", + "@alkemio/client-lib": "^0.27.0", "@alkemio/notifications-lib": "^0.6.0", "@nestjs/common": "^8.0.5", "@nestjs/config": "^1.0.1", @@ -65,9 +65,9 @@ } }, "node_modules/@alkemio/client-lib": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.25.0.tgz", - "integrity": "sha512-Bdub1w4maGh9RxLhMXuAUr+k9Js2ECOnsFhXriH1lTtmM99VvKUfMO5/Xvr3QBYmF1uLwhFey6SiIa+Fm89W9A==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.27.0.tgz", + "integrity": "sha512-Gv4Ku6ZVt8+aF1Nsi1GLVzm2fCzTroS6szKs3/qZIqcFLkgFWEKNpPqb3ROU09c2qVD5tJMmsb5Zdetc/abO2Q==", "dependencies": { "@graphql-codegen/typescript-graphql-request": "^4.5.3", "@graphql-codegen/typescript-operations": "^2.5.3", @@ -14600,9 +14600,9 @@ }, "dependencies": { "@alkemio/client-lib": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.25.0.tgz", - "integrity": "sha512-Bdub1w4maGh9RxLhMXuAUr+k9Js2ECOnsFhXriH1lTtmM99VvKUfMO5/Xvr3QBYmF1uLwhFey6SiIa+Fm89W9A==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@alkemio/client-lib/-/client-lib-0.27.0.tgz", + "integrity": "sha512-Gv4Ku6ZVt8+aF1Nsi1GLVzm2fCzTroS6szKs3/qZIqcFLkgFWEKNpPqb3ROU09c2qVD5tJMmsb5Zdetc/abO2Q==", "requires": { "@graphql-codegen/typescript-graphql-request": "^4.5.3", "@graphql-codegen/typescript-operations": "^2.5.3", diff --git a/service/package.json b/service/package.json index 4720102f..2cb7649a 100644 --- a/service/package.json +++ b/service/package.json @@ -1,6 +1,6 @@ { "name": "alkemio-notifications", - "version": "0.15.1", + "version": "0.15.2", "description": "Alkemio notifications service", "author": "Alkemio Foundation", "private": false, @@ -35,7 +35,7 @@ "validate-connection": "ts-node src/utils/validate-connection.ts" }, "dependencies": { - "@alkemio/client-lib": "^0.25.0", + "@alkemio/client-lib": "^0.27.0", "@alkemio/notifications-lib": "^0.6.0", "@nestjs/common": "^8.0.5", "@nestjs/config": "^1.0.1", diff --git a/service/src/templates/_layouts/email-transactional.html b/service/src/templates/_layouts/email-transactional.html index 81d58651..bfff9a05 100644 --- a/service/src/templates/_layouts/email-transactional.html +++ b/service/src/templates/_layouts/email-transactional.html @@ -57,6 +57,9 @@ text-align: center; white-space: pre-line; } + .content pre { + font-family: inherit; + } .action-button { background-color: #065f6b; border: none; diff --git a/service/src/templates/comment.reply.js b/service/src/templates/comment.reply.js index e30db9e0..9c9206a2 100644 --- a/service/src/templates/comment.reply.js +++ b/service/src/templates/comment.reply.js @@ -15,8 +15,7 @@ module.exports = () => ({ {{reply.createdBy}} replied to your comment on "{{comment.commentOrigin}}":

- "{{reply.message}}" - +
"{{reply.message}}"


HAVE A LOOK!

diff --git a/service/src/templates/communication.comment.mention.organization.js b/service/src/templates/communication.comment.mention.organization.js index 32272ce1..3f3168f1 100644 --- a/service/src/templates/communication.comment.mention.organization.js +++ b/service/src/templates/communication.comment.mention.organization.js @@ -16,9 +16,9 @@ module.exports = () => ({ {% block content %}Hi {{recipient.firstName}},

{{commentSender.displayName}} mentioned '{{mentionedOrganization.displayName}}' in a comment on '{{commentOrigin.displayName}}': -

- {{comment}} -

+
+
{{comment}}
+
HAVE A LOOK!

{% endblock %} diff --git a/service/src/templates/communication.comment.mention.user.js b/service/src/templates/communication.comment.mention.user.js index 78881a34..4d70c61c 100644 --- a/service/src/templates/communication.comment.mention.user.js +++ b/service/src/templates/communication.comment.mention.user.js @@ -16,9 +16,9 @@ module.exports = () => ({ {% block content %}Hi {{recipient.firstName}},

{{commentSender.displayName}} mentioned you in a comment on "{{commentOrigin.displayName}}": -

- {{comment}} -

+
+
{{comment}}
+
HAVE A LOOK!

{% endblock %} diff --git a/service/src/templates/communication.community.leads.message.recipient.js b/service/src/templates/communication.community.leads.message.recipient.js index cac53741..a388b6e8 100644 --- a/service/src/templates/communication.community.leads.message.recipient.js +++ b/service/src/templates/communication.community.leads.message.recipient.js @@ -10,15 +10,14 @@ module.exports = () => ({ from: '{{emailFrom}}', to: '{{recipient.email}}', replyTo: '{{messageSender.email}}', - subject: - '{{messageSender.displayName}} sent a message to your community', + subject: '{{messageSender.displayName}} sent a message to your community', html: `{% extends "src/templates/_layouts/email-transactional.html" %} {% block content %}Hi {{recipient.firstName}},

{{messageSender.displayName}} sent a message to you in your role as a lead of '{{journey.displayName}}': -

- {{message}} -

+
+
{{message}}
+
You can reply to this email to respond directly to {{messageSender.firstName}}. Please keep in mind that this way, your email address will become visible. If you prefer to communicate through Alkemio, click on the envelope icon on {{messageSender.displayName}}'s profile.

diff --git a/service/src/templates/communication.community.leads.message.sender.js b/service/src/templates/communication.community.leads.message.sender.js index bf1639b8..a2121423 100644 --- a/service/src/templates/communication.community.leads.message.sender.js +++ b/service/src/templates/communication.community.leads.message.sender.js @@ -14,9 +14,9 @@ module.exports = () => ({ {% block content %}Hi {{recipient.firstName}},

You have sent the following message to the community lead(s) of {{journey.displayName}}: -

- {{message}} -

+
+
{{message}}
+
{% endblock %} diff --git a/service/src/templates/communication.organization.message.recipient.js b/service/src/templates/communication.organization.message.recipient.js index 6157a97f..63b7162b 100644 --- a/service/src/templates/communication.organization.message.recipient.js +++ b/service/src/templates/communication.organization.message.recipient.js @@ -16,9 +16,9 @@ module.exports = () => ({ {% block content %}Hi {{recipient.firstName}},

{{messageSender.displayName}} sent a message to {{organization.displayName}}: -

- {{message}} -

+
+
{{message}}
+
You can reply to this email to respond directly to {{messageSender.firstName}}. Please keep in mind that this way, your email address will become visible. If you prefer to communicate through Alkemio, click on the envelope icon on {{messageSender.displayName}}'s profile.

diff --git a/service/src/templates/communication.organization.message.sender.js b/service/src/templates/communication.organization.message.sender.js index 19f383d8..5210d762 100644 --- a/service/src/templates/communication.organization.message.sender.js +++ b/service/src/templates/communication.organization.message.sender.js @@ -14,9 +14,9 @@ module.exports = () => ({ {% block content %}Hi {{recipient.firstName}},

You have sent the following message to {{organization.displayName}}: -

- {{message}} -

+
+
{{message}}
+
{% endblock %} diff --git a/service/src/templates/communication.user.message.recipient.js b/service/src/templates/communication.user.message.recipient.js index 1ba4dbd9..d5b05837 100644 --- a/service/src/templates/communication.user.message.recipient.js +++ b/service/src/templates/communication.user.message.recipient.js @@ -13,12 +13,9 @@ module.exports = () => ({ subject: '{{messageSender.displayName}} sent you a message!', html: `{% extends "src/templates/_layouts/email-transactional.html" %} {% block content %}Hi {{recipient.firstName}},

- {{messageSender.displayName}} has sent you a message:
-
- {{message}} -
+
{{message}}

You can reply to this email to respond directly to {{messageSender.firstName}}. Please keep in mind that this way, your email address will become visible. diff --git a/service/src/templates/communication.user.message.sender.js b/service/src/templates/communication.user.message.sender.js index 9609adb6..0bafbaf9 100644 --- a/service/src/templates/communication.user.message.sender.js +++ b/service/src/templates/communication.user.message.sender.js @@ -15,7 +15,7 @@ module.exports = () => ({ You have sent the following message to {{messageReceiver.displayName}}:
- {{message}} +
{{message}}

{% endblock %} diff --git a/service/src/templates/community.external.invitation.created.invitee.js b/service/src/templates/community.external.invitation.created.invitee.js index 09ec2b5d..bd4f2703 100644 --- a/service/src/templates/community.external.invitation.created.invitee.js +++ b/service/src/templates/community.external.invitation.created.invitee.js @@ -14,7 +14,7 @@ module.exports = () => ({ {% block content %}{{inviter.firstName}} has invited you to join {{journey.displayName}} on Alkemio. {% if welcomeMessage %}
- {{welcomeMessage}} +
{{welcomeMessage}}
{% endif %}
click here to accept or decline

diff --git a/service/src/templates/community.external.invitation.created.inviter.js b/service/src/templates/community.external.invitation.created.inviter.js index ef25caa5..22bb5745 100644 --- a/service/src/templates/community.external.invitation.created.inviter.js +++ b/service/src/templates/community.external.invitation.created.inviter.js @@ -15,7 +15,7 @@ module.exports = () => ({ You have invited {{emails}} to join {{journey.displayName}}. {% if welcomeMessage %}
- {{welcomeMessage}} +
{{welcomeMessage}}
{% endif %}
{% endblock %} diff --git a/service/src/templates/community.invitation.created.invitee.js b/service/src/templates/community.invitation.created.invitee.js index 8ee34e03..fcf425c4 100644 --- a/service/src/templates/community.invitation.created.invitee.js +++ b/service/src/templates/community.invitation.created.invitee.js @@ -14,7 +14,7 @@ module.exports = () => ({ {% block content %}Hi {{recipient.firstName}},
{{inviter.firstName}} has invited you to join {{journey.displayName}}.
- {{welcomeMessage}} +
{{welcomeMessage}}

click here to accept or decline

{% endblock %} From 2837a3cd5ace863f99068b2cb0672e3edcfe0e89 Mon Sep 17 00:00:00 2001 From: Simone <38861315+SimoneZaza@users.noreply.github.com> Date: Mon, 26 Feb 2024 13:47:32 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Updated=20new=20platform=20email=20-=20Plea?= =?UTF-8?q?se=20check=20first=20:)=20Update=20platform.user.regist?= =?UTF-8?q?=E2=80=A6=20(#288)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updated new platform email - Check first! Update platform.user.registration.registrant.js * Bump service version. * Update user registration template. --------- Co-authored-by: Aleksandar --- service/package-lock.json | 4 ++-- service/package.json | 2 +- .../platform.user.registration.registrant.js | 24 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/service/package-lock.json b/service/package-lock.json index 4cc0b8aa..0c3bb6e9 100644 --- a/service/package-lock.json +++ b/service/package-lock.json @@ -1,12 +1,12 @@ { "name": "alkemio-notifications", - "version": "0.15.1", + "version": "0.15.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alkemio-notifications", - "version": "0.15.1", + "version": "0.15.3", "license": "EUPL-1.2", "dependencies": { "@alkemio/client-lib": "^0.27.0", diff --git a/service/package.json b/service/package.json index 2cb7649a..9f4ec00c 100644 --- a/service/package.json +++ b/service/package.json @@ -1,6 +1,6 @@ { "name": "alkemio-notifications", - "version": "0.15.2", + "version": "0.15.3", "description": "Alkemio notifications service", "author": "Alkemio Foundation", "private": false, diff --git a/service/src/templates/platform.user.registration.registrant.js b/service/src/templates/platform.user.registration.registrant.js index b241cd3e..74149634 100644 --- a/service/src/templates/platform.user.registration.registrant.js +++ b/service/src/templates/platform.user.registration.registrant.js @@ -11,19 +11,19 @@ module.exports = () => ({ to: '{{recipient.email}}', subject: 'Alkemio - Registration successful!', html: `{% extends "src/templates/_layouts/email-transactional.html" %} - {% block content %}Hi {{registrant.firstName}}, welcome to the Alkemio platform!
+ {% block content %} +

Dear {{registrant.firstName}},

+

Welcome aboard the Alkemio platform! Your account creation was a success β€” congratulations! πŸŽ‰ Perhaps you have already explored the platform, but let’s ensure you are fully equipped to dive in with the links below.


+

🌐 Find Spaces: At Alkemio, users collaborate within Spaces. If you are looking for a particular Space, use the search functionality on your Dashboard.

+

πŸš€ Explore the possibilities: Take a peek at our Welcome Space β€” it’s an open Space for you to explore the platform's structure and functionality.

+

πŸ“Έ Personalize Your Profile: Add a friendly photo to your profile so fellow users can put a face to your name.

+

πŸ’Œ Need Assistance?: Whether you’re keen on starting your own Space or require support, our Community team is here for you. Reach out anytime at community@alkem.io.

+

❔ Learn More: For additional details about Alkemio, check out our website.


- Your account has been successfully created. Please spend some time to further populate your profile so that other users and organizations can find you. -

- YOUR PROFILE

- On the Homepage and Challenges page you'll find all available Spaces and Challenges for you to join. -
- Looking forward to seeing your interactions and contributions!

- - Sincerely yours,

- - The Alkemio team -

+

We are looking forward to seeing your interactions and contributions!

+

Warm regards,

+

The Alkemio Team 🌟

+

{% endblock %} ${templates.footerBlock}`, },