Skip to content

Commit

Permalink
Regression: Upload was not working (#10543)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok authored Apr 21, 2018
1 parent 4470941 commit a2e14af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 877 deletions.
1 change: 0 additions & 1 deletion packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,6 @@
"optional": "optional",
"or": "or",
"Oops_page_not_found": "Oops, page not found",
"Open_your_authentication_app_and_enter_the_code": "Open your authentication app and enter the code. You can also use one of your backup codes.",
"Or_talk_as_anonymous": "Or talk as anonymous",
"Order": "Order",
"Original": "Original",
Expand Down
6 changes: 4 additions & 2 deletions packages/rocketchat-lib/server/functions/sendMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ const validateAttachment = attachment => {
title_link_download: Match.Maybe(Boolean),
image_url: Match.Maybe(String),
audio_url: Match.Maybe(String),
video_url: Match.Maybe(String)
video_url: Match.Maybe(String),
fields: Match.Maybe(Array)
}));
if (attachment.fields.length) {

if (attachment.fields && attachment.fields.length) {
attachment.fields.map(validateAttachmentsFields);
}
};
Expand Down
Loading

0 comments on commit a2e14af

Please sign in to comment.