diff --git a/packages/rocketchat-apps/server/converters/messages.js b/packages/rocketchat-apps/server/converters/messages.js index ebac12f73228..215e278d7ed5 100644 --- a/packages/rocketchat-apps/server/converters/messages.js +++ b/packages/rocketchat-apps/server/converters/messages.js @@ -133,9 +133,17 @@ export class AppMessagesConverter { title: attachment.title ? attachment.title.value : undefined, title_link: attachment.title ? attachment.title.link : undefined, title_link_download: attachment.title ? attachment.title.displayDownloadLink : undefined, + image_dimensions: attachment.imageDimensions, + image_preview: attachment.imagePreview, image_url: attachment.imageUrl, + image_type: attachment.imageType, + image_size: attachment.imageSize, audio_url: attachment.audioUrl, + audio_type: attachment.audioType, + audio_size: attachment.audioSize, video_url: attachment.videoUrl, + video_type: attachment.videoType, + video_size: attachment.videoSize, fields: attachment.fields, button_alignment: attachment.actionButtonsAlignment, actions: attachment.actions, @@ -185,9 +193,17 @@ export class AppMessagesConverter { thumbnailUrl: attachment.thumb_url, author, title, + imageDimensions: attachment.image_dimensions, + imagePreview: attachment.image_preview, imageUrl: attachment.image_url, + imageType: attachment.image_type, + imageSize: attachment.image_size, audioUrl: attachment.audio_url, + audioType: attachment.audio_type, + audioSize: attachment.audio_size, videoUrl: attachment.video_url, + videoType: attachment.video_type, + videoSize: attachment.video_size, fields: attachment.fields, actionButtonsAlignment: attachment.button_alignment, actions: attachment.actions, diff --git a/packages/rocketchat-lib/server/functions/sendMessage.js b/packages/rocketchat-lib/server/functions/sendMessage.js index 4a5218e7ad65..4fcda633e5c6 100644 --- a/packages/rocketchat-lib/server/functions/sendMessage.js +++ b/packages/rocketchat-lib/server/functions/sendMessage.js @@ -58,9 +58,17 @@ const validateAttachment = (attachment) => { title: String, title_link: String, title_link_download: Boolean, + image_dimensions: Object, image_url: String, + image_preview: String, + image_type: String, + image_size: Number, audio_url: String, + audio_type: String, + audio_size: Number, video_url: String, + video_type: String, + video_size: Number, fields: [Match.Any], }));