From 00755072ee29d1cc4e237cf891f07f5175d0d576 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 10 Jan 2019 12:26:06 -0800 Subject: [PATCH] Include caption, width and height for outgoing attachments --- libtextsecure/sendmessage.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index 3daeb86a2..1bd2918b1 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -176,15 +176,26 @@ MessageSender.prototype = { proto.id = id; proto.contentType = attachment.contentType; proto.digest = result.digest; - if (attachment.fileName) { - proto.fileName = attachment.fileName; - } + if (attachment.size) { proto.size = attachment.size; } + if (attachment.fileName) { + proto.fileName = attachment.fileName; + } if (attachment.flags) { proto.flags = attachment.flags; } + if (attachment.width) { + proto.width = attachment.width; + } + if (attachment.height) { + proto.height = attachment.height; + } + if (attachment.caption) { + proto.caption = attachment.caption; + } + return proto; }) );