regression: Convert emoji shortname to unicode on notification emails (#31521)

pull/31523/head
gabriellsh 2 years ago committed by GitHub
parent 448e35a218
commit c153fbfb68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      apps/meteor/app/lib/server/lib/sendNotificationsOnMessage.js

@ -148,9 +148,11 @@ export const sendNotification = async ({
) {
const messageWithUnicode = message.msg ? emojione.shortnameToUnicode(message.msg) : message.msg;
const firstAttachment = message.attachments?.length > 0 && message.attachments.shift();
firstAttachment.description =
typeof firstAttachment.description === 'string' ? emojione.shortnameToUnicode(firstAttachment.description) : undefined;
firstAttachment.text = typeof firstAttachment.text === 'string' ? emojione.shortnameToUnicode(firstAttachment.text) : undefined;
if (firstAttachment) {
firstAttachment.description =
typeof firstAttachment.description === 'string' ? emojione.shortnameToUnicode(firstAttachment.description) : undefined;
firstAttachment.text = typeof firstAttachment.text === 'string' ? emojione.shortnameToUnicode(firstAttachment.text) : undefined;
}
const attachments = firstAttachment ? [firstAttachment, ...message.attachments].filter(Boolean) : [];
for await (const email of receiver.emails) {

Loading…
Cancel
Save