Skip to content

Commit

Permalink
regression: Convert emoji shortname to unicode on notification emails (
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored Jan 23, 2024
1 parent 448e35a commit c153fbf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/meteor/app/lib/server/lib/sendNotificationsOnMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c153fbf

Please sign in to comment.