Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Upload was not working #10543

Merged
merged 1 commit into from
Apr 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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