diff --git a/backend/pom.xml b/backend/pom.xml index 412fffd..7c2c774 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -6,7 +6,7 @@ com.wire.bots roman - 1.18.7 + 1.18.8 Roman Wire Bot API Proxy @@ -39,6 +39,11 @@ lithium ${lithium.version} + + com.wire + xenon + 1.5.2 + com.lambdaworks scrypt diff --git a/backend/src/main/java/com/wire/bots/roman/Sender.java b/backend/src/main/java/com/wire/bots/roman/Sender.java index aa15ce7..7358b3d 100644 --- a/backend/src/main/java/com/wire/bots/roman/Sender.java +++ b/backend/src/main/java/com/wire/bots/roman/Sender.java @@ -153,7 +153,7 @@ private UUID sendPicture(IncomingMessage message, UUID botId) throws Exception { final Attachment attachment = message.attachment; UUID messageId = UUID.randomUUID(); - Picture preview = new Picture(messageId, attachment.mimeType); + ImagePreview preview = new ImagePreview(messageId, attachment.mimeType); preview.setHeight(attachment.height); preview.setWidth(attachment.width); preview.setSize(attachment.size.intValue()); @@ -162,11 +162,11 @@ private UUID sendPicture(IncomingMessage message, UUID botId) throws Exception { AssetBase asset; if (message.attachment.meta != null) { - asset = new Picture(preview.getMessageId(), attachment.mimeType); + asset = new ImageAsset(preview.getMessageId(), null, attachment.mimeType); setAssetMetadata(asset, message.attachment.meta); } else if (message.attachment.data != null) { final byte[] bytes = Base64.getDecoder().decode(message.attachment.data); - asset = new Picture(bytes, attachment.mimeType); + asset = new ImageAsset(messageId, bytes, attachment.mimeType); asset.setMessageId(messageId); uploadAssetData(wireClient, asset); } else {