1 package org
.asamk
.signal
;
3 import org
.whispersystems
.signalservice
.api
.messages
.SignalServiceAttachment
;
4 import org
.whispersystems
.signalservice
.api
.messages
.SignalServiceAttachmentPointer
;
11 JsonAttachment(SignalServiceAttachment attachment
) {
12 this.contentType
= attachment
.getContentType();
13 final SignalServiceAttachmentPointer pointer
= attachment
.asPointer();
14 if (attachment
.isPointer()) {
15 this.id
= pointer
.getId();
16 if (pointer
.getSize().isPresent()) {
17 this.size
= pointer
.getSize().get();