Skip to content

Commit

Permalink
xenon 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dkovacevic committed Jul 5, 2023
1 parent 579f237 commit 7305091
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.wire.bots</groupId>
<artifactId>roman</artifactId>
<version>1.18.7</version>
<version>1.18.8</version>

<name>Roman</name>
<description>Wire Bot API Proxy</description>
Expand Down Expand Up @@ -39,6 +39,11 @@
<artifactId>lithium</artifactId>
<version>${lithium.version}</version>
</dependency>
<dependency>
<groupId>com.wire</groupId>
<artifactId>xenon</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>com.lambdaworks</groupId>
<artifactId>scrypt</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions backend/src/main/java/com/wire/bots/roman/Sender.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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 {
Expand Down

0 comments on commit 7305091

Please sign in to comment.