From e490604d4320352531dc53570962de8f48341c26 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sun, 29 Sep 2019 11:21:15 +0200 Subject: [PATCH] Output attachment id as json string to prevent rounding due to conversion to double Fixes #226 --- src/main/java/org/asamk/signal/JsonAttachment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/asamk/signal/JsonAttachment.java b/src/main/java/org/asamk/signal/JsonAttachment.java index 785fa9e2..58165639 100644 --- a/src/main/java/org/asamk/signal/JsonAttachment.java +++ b/src/main/java/org/asamk/signal/JsonAttachment.java @@ -7,7 +7,7 @@ class JsonAttachment { String contentType; String filename; - long id; + String id; int size; JsonAttachment(SignalServiceAttachment attachment) { @@ -15,7 +15,7 @@ class JsonAttachment { final SignalServiceAttachmentPointer pointer = attachment.asPointer(); if (attachment.isPointer()) { - this.id = pointer.getId(); + this.id = String.valueOf(pointer.getId()); if (pointer.getFileName().isPresent()) { this.filename = pointer.getFileName().get(); }