Spectrum: Templates are not updated

Created on 21 Feb 2019  路  3Comments  路  Source: withspectrum/spectrum

The template ID were hardcoded on following file (hermes/queues/constants.js), but the template files (email-templates) were not updated accordingly.

I searched and found correlation between following files. These should be updated to ensure the tests are working properly.

A bit more research gave me another question,

What is the difference between NEW_MESSAGE_TEMPLATE and NEW_DIRECT_MESSAGE_TEMPLATE? Are they same thing?

Is this considered an issue?

export const NEW_MESSAGE_TEMPLATE = IS_PROD
? 'd-1379042b64ba4c6093fecaec7161480a'
: 'd-7a4c14fd440146f1b1cfcafb633bb040';
  • hermes/queues/send-new-message-email.js
  • email-templates/newDirectMessage.html
export const NEW_MENTION_THREAD_TEMPLATE = IS_PROD
? 'd-343ec51df23943e88d0709aa8e30312b'
: 'd-ff421ea0112a4525b6615bcc666ede00';
  • hermes/queues/send-mention-thread-email.js
  • email-templates/mentionInThread.html
export const NEW_MENTION_MESSAGE_TEMPLATE = IS_PROD
? 'd-5ef46b71baee4c67bc46ab867e14d5bb'
: 'd-637189bc871744e9846694bff9f572ae';
  • hermes/queues/send-mention-message-email.js
  • email-templates/mentionInMessage.html
export const NEW_THREAD_CREATED_TEMPLATE = IS_PROD
? 'd-2809d28ff1cc4d89a503e04de3388411'
: 'd-084c11332981443388ebdae05d0a2ff4';
  • hermes/queues/send-new-thread-email.js
  • email-template-scripts/test-email-data/thread-created.json
  • email-templates/newThreadNotification.html
export const DIGEST_TEMPLATE = IS_PROD
? 'd-54e8d4905da64158a98ddb92c9330583'
: 'd-5e52250c25be4654af82172970551919';
  • hermes/queues/send-digest-email.js
  • email-template-scripts/test-email-data/digest.json
  • email-templates/weeklyDigest.html
export const EMAIL_VALIDATION_TEMPLATE = IS_PROD
? 'd-8cd6c640e2d944c7a4bb8877722ff00f'
: 'd-9fbb3cc969364050aac891c255d31209';
  • hermes/queues/send-email-validation-email.js
  • email-template-scripts/test-email-data/user-email-validation.json
  • email-templates/validate-email.html
export const ADMINISTRATOR_EMAIL_VALIDATION_TEMPLATE = IS_PROD
? 'd-c7ab6234c65b47d88413d9deaae0f7f1'
: 'd-a60e1df2d5294c73818759be13f09df4';
  • hermes/queues/send-administrator-email-validation-email.js
  • email-template-scripts/test-email-data/community-admin-email-validation.json
  • email-templates/validate-community-administrator-email.html
export const ADMIN_TOXIC_MESSAGE_TEMPLATE =
'd-f6e52c81dd8d49e29f23c5c6112d676b';
  • hermes/queues/send-admin-toxic-content-email.js
  • email-templates/adminToxicContent.html

Most helpful comment

You didn't understand my question but answered it perfectly.

All 3 comments

Hey @entrptaher I suppose I'm not quite sure what the question is here. The email template .html files are using the ids from hermes constants.js - we don't have any automation there, mostly because these will almost never be changed and if we add a new email type we only need to put the constant in 2 places.

You didn't understand my question but answered it perfectly.

Oops, sorry about it, but glad the answer worked out 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brianlovin picture brianlovin  路  3Comments

mxstbr picture mxstbr  路  3Comments

dmitryyankowski picture dmitryyankowski  路  4Comments

atlx picture atlx  路  5Comments

brianlovin picture brianlovin  路  6Comments