mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-08-29 06:06:22 +00:00
Revert more changes
This commit is contained in:
parent
6810877b4d
commit
11ee28a2e1
@ -6,10 +6,7 @@ import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
|
||||
@JsonSchema(title = "EditMessage")
|
||||
record JsonEditMessage(
|
||||
long targetSentTimestamp,
|
||||
JsonDataMessage dataMessage
|
||||
) {
|
||||
record JsonEditMessage(long targetSentTimestamp, JsonDataMessage dataMessage) {
|
||||
|
||||
static JsonEditMessage from(MessageEnvelope.Edit editMessage, Manager m) {
|
||||
return new JsonEditMessage(editMessage.targetSentTimestamp(),
|
||||
|
||||
@ -5,10 +5,7 @@ import io.micronaut.jsonschema.JsonSchema;
|
||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
|
||||
@JsonSchema(title = "Payment")
|
||||
public record JsonPayment(
|
||||
String note,
|
||||
byte[] receipt
|
||||
) {
|
||||
public record JsonPayment(String note, byte[] receipt) {
|
||||
|
||||
static JsonPayment from(MessageEnvelope.Data.Payment payment) {
|
||||
return new JsonPayment(payment.note(), payment.receipt());
|
||||
|
||||
@ -5,12 +5,7 @@ import io.micronaut.jsonschema.JsonSchema;
|
||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
|
||||
@JsonSchema(title = "Preview")
|
||||
public record JsonPreview(
|
||||
String url,
|
||||
String title,
|
||||
String description,
|
||||
JsonAttachment image
|
||||
) {
|
||||
public record JsonPreview(String url, String title, String description, JsonAttachment image) {
|
||||
|
||||
static JsonPreview from(MessageEnvelope.Data.Preview preview) {
|
||||
return new JsonPreview(preview.url(),
|
||||
|
||||
@ -6,10 +6,7 @@ import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
import org.asamk.signal.util.Hex;
|
||||
|
||||
@JsonSchema(title = "Sticker")
|
||||
public record JsonSticker(
|
||||
String packId,
|
||||
int stickerId
|
||||
) {
|
||||
public record JsonSticker(String packId, int stickerId) {
|
||||
|
||||
static JsonSticker from(MessageEnvelope.Data.Sticker sticker) {
|
||||
final var packId = Hex.toStringCondensed(sticker.packId().serialize());
|
||||
|
||||
@ -8,9 +8,7 @@ import java.util.UUID;
|
||||
|
||||
@JsonSchema(title = "StoryContext")
|
||||
record JsonStoryContext(
|
||||
String authorNumber,
|
||||
String authorUuid,
|
||||
long sentTimestamp
|
||||
String authorNumber, String authorUuid, long sentTimestamp
|
||||
) {
|
||||
|
||||
static JsonStoryContext from(MessageEnvelope.Data.StoryContext storyContext) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user