Adapt json output to always use receiptMessage and remove isReceipt field

Fixes #346
This commit is contained in:
AsamK 2020-11-22 10:48:42 +01:00
parent a634b46eb2
commit 4485188789
2 changed files with 17 additions and 3 deletions

View file

@ -22,4 +22,15 @@ class JsonReceiptMessage {
}
this.timestamps = receiptMessage.getTimestamps();
}
private JsonReceiptMessage(final long when, final boolean isDelivery, final boolean isRead, final List<Long> timestamps) {
this.when = when;
this.isDelivery = isDelivery;
this.isRead = isRead;
this.timestamps = timestamps;
}
static JsonReceiptMessage deliveryReceipt(final long when, final List<Long> timestamps) {
return new JsonReceiptMessage(when, true, false, timestamps);
}
}