diff --git a/backend/src/activitypub/routes/webfinger.js b/backend/src/activitypub/routes/webfinger.js index 8499879f9..6b8f3e14c 100644 --- a/backend/src/activitypub/routes/webfinger.js +++ b/backend/src/activitypub/routes/webfinger.js @@ -45,7 +45,7 @@ export async function handler(req, res) { } catch (error) { debug(error) return res.status(500).json({ - error: `Something went terribly wrong. Please contact ${CONFIG.EMAIL_SUPPORT}`, + error: `Something went terribly wrong. Please visit ${CONFIG.SUPPORT_URL}`, }) } finally { session.close() diff --git a/backend/src/config/index.js b/backend/src/config/index.js index ea00d7a86..0f024b670 100644 --- a/backend/src/config/index.js +++ b/backend/src/config/index.js @@ -1,4 +1,6 @@ import dotenv from 'dotenv' +import links from './links.js' + if (require.resolve) { // are we in a nodejs environment? try { @@ -37,7 +39,6 @@ const { REDIS_PORT, REDIS_PASSWORD, EMAIL_DEFAULT_SENDER, - EMAIL_SUPPORT, } = env export const requiredConfigs = { @@ -92,7 +93,7 @@ export const s3Configs = { export const customConfigs = { EMAIL_DEFAULT_SENDER, - EMAIL_SUPPORT, + SUPPORT_URL: links.SUPPORT, } export default { diff --git a/backend/src/config/links.js b/backend/src/config/links.js new file mode 100644 index 000000000..6068498c2 --- /dev/null +++ b/backend/src/config/links.js @@ -0,0 +1,6 @@ +export default { + ORGANIZATION: 'https://human-connection.org/', + DONATE: 'https://human-connection.org/spenden/', + FAQ: 'https://faq.human-connection.org/', + SUPPORT: 'https://human-connection.org/support' +} diff --git a/backend/src/middleware/email/templateBuilder.js b/backend/src/middleware/email/templateBuilder.js index ab92aeb33..1a0aad9d5 100644 --- a/backend/src/middleware/email/templateBuilder.js +++ b/backend/src/middleware/email/templateBuilder.js @@ -4,7 +4,8 @@ import CONFIG from '../../config' import * as templates from './templates' const from = CONFIG.EMAIL_DEFAULT_SENDER -const supportUrl = 'https://human-connection.org/en/contact' +const supportUrl = CONFIG.SUPPORT_URL +const welcomeImageUrl = new URL(`/img/custom/welcome.svg`, CONFIG.CLIENT_URI) export const signupTemplate = ({ email, nonce }) => { const subject = 'Willkommen, Bienvenue, Welcome to Human Connection!' @@ -18,7 +19,7 @@ export const signupTemplate = ({ email, nonce }) => { subject, html: mustache.render( templates.layout, - { actionUrl, nonce, supportUrl, subject }, + { actionUrl, nonce, supportUrl, welcomeImageUrl, subject }, { content: templates.signup }, ), } @@ -36,7 +37,7 @@ export const emailVerificationTemplate = ({ email, nonce, name }) => { subject, html: mustache.render( templates.layout, - { actionUrl, name, nonce, supportUrl, subject }, + { actionUrl, name, nonce, supportUrl, welcomeImageUrl, subject }, { content: templates.emailVerification }, ), } @@ -54,7 +55,7 @@ export const resetPasswordTemplate = ({ email, nonce, name }) => { subject, html: mustache.render( templates.layout, - { actionUrl, name, nonce, supportUrl, subject }, + { actionUrl, name, nonce, supportUrl, welcomeImageUrl, subject }, { content: templates.passwordReset }, ), } @@ -70,7 +71,7 @@ export const wrongAccountTemplate = ({ email }) => { subject, html: mustache.render( templates.layout, - { actionUrl, supportUrl }, + { actionUrl, supportUrl, welcomeImageUrl }, { content: templates.wrongAccount }, ), } diff --git a/backend/src/middleware/email/templates/emailVerification.html b/backend/src/middleware/email/templates/emailVerification.html index 939ceccdb..dda8684ec 100644 --- a/backend/src/middleware/email/templates/emailVerification.html +++ b/backend/src/middleware/email/templates/emailVerification.html @@ -6,7 +6,7 @@
@@ -104,7 +104,7 @@
diff --git a/backend/src/middleware/email/templates/resetPassword.html b/backend/src/middleware/email/templates/resetPassword.html
index 768051070..5026c8dcc 100644
--- a/backend/src/middleware/email/templates/resetPassword.html
+++ b/backend/src/middleware/email/templates/resetPassword.html
@@ -6,7 +6,7 @@
@@ -104,7 +104,7 @@
diff --git a/backend/src/middleware/email/templates/signup.html b/backend/src/middleware/email/templates/signup.html
index ad60d9323..174137859 100644
--- a/backend/src/middleware/email/templates/signup.html
+++ b/backend/src/middleware/email/templates/signup.html
@@ -6,7 +6,7 @@
@@ -117,7 +117,7 @@
diff --git a/backend/src/middleware/email/templates/wrongAccount.html b/backend/src/middleware/email/templates/wrongAccount.html
index cbf6e3cbb..d6574aac5 100644
--- a/backend/src/middleware/email/templates/wrongAccount.html
+++ b/backend/src/middleware/email/templates/wrongAccount.html
@@ -6,7 +6,7 @@
diff --git a/docker-compose.yml b/docker-compose.yml
index 453dfac15..9b9146b3f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -45,7 +45,6 @@ services:
- MAPBOX_TOKEN=pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ
- PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78
- "DEBUG=${DEBUG}"
- - EMAIL_SUPPORT=support@human-connection.org
- EMAIL_DEFAULT_SENDER=info@human-connection.org
neo4j:
image: schoolsinmotion/neo4j:latest
diff --git a/webapp/constants/links.js b/webapp/constants/links.js
index 07249dc7c..6068498c2 100644
--- a/webapp/constants/links.js
+++ b/webapp/constants/links.js
@@ -2,4 +2,5 @@ export default {
ORGANIZATION: 'https://human-connection.org/',
DONATE: 'https://human-connection.org/spenden/',
FAQ: 'https://faq.human-connection.org/',
+ SUPPORT: 'https://human-connection.org/support'
}