Skip to content

Commit

Permalink
Fix the attachments and fields incorrectly failing on validation (#10573
Browse files Browse the repository at this point in the history
)
  • Loading branch information
graywolf336 authored and rodrigok committed Apr 24, 2018
1 parent d8afb60 commit fda38bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rocketchat-lib/server/functions/sendMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const validateAttachment = attachment => {
image_url: String,
audio_url: String,
video_url: String,
fields: Array
fields: [Match.Any]
}));

if (attachment.fields && attachment.fields.length) {
Expand All @@ -65,7 +65,7 @@ RocketChat.sendMessage = function(user, message, room, upsert = false) {
alias: String,
emoji: String,
avatar: String,
attachments: Array
attachments: [Match.Any]
}));

if (Array.isArray(message.attachments) && message.attachments.length) {
Expand Down

0 comments on commit fda38bb

Please sign in to comment.