Merge pull request #15657 from RocketChat/fix-exception-on-email

[FIX] Exception when sending email of messages attachments undefined
pull/15667/head
Rodrigo Nascimento 6 years ago
parent 54201df4b9
commit d29d0edc18
  1. 2
      app/lib/server/functions/notifications/email.js

@ -76,7 +76,7 @@ function getEmailContent({ message, user, room }) {
return header;
}
if (message.attachments.length > 0) {
if (Array.isArray(message.attachments) && message.attachments.length > 0) {
const [attachment] = message.attachments;
let content = '';

Loading…
Cancel
Save