add JsonPayment (#808)

This commit is contained in:
technillogue 2021-11-23 02:14:01 -05:00 committed by GitHub
parent d13d150fe1
commit 5cd5697aea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,9 @@
package org.asamk.signal.json;
import org.asamk.signal.manager.api.MessageEnvelope;
public record JsonPayment(String note, byte[] receipt) {
static JsonPayment from(MessageEnvelope.Data.Payment payment) {
return new JsonPayment(payment.note(), payment.receipt());
}
}