mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 23:48:01 +01:00
Add field to RestoreAccountRequest for device transfer initialization
This commit is contained in:
committed by
ravi-signal
parent
ea17eee320
commit
760c5737f9
@@ -5,8 +5,13 @@
|
||||
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.annotation.Nullable;
|
||||
import org.whispersystems.textsecuregcm.util.ByteArrayAdapter;
|
||||
|
||||
@Schema(description = """
|
||||
Represents a request from a new device to restore account data by some method.
|
||||
@@ -14,7 +19,14 @@ import jakarta.validation.constraints.NotNull;
|
||||
public record RestoreAccountRequest(
|
||||
@NotNull
|
||||
@Schema(description = "The method by which the new device has requested account data restoration")
|
||||
Method method) {
|
||||
Method method,
|
||||
|
||||
@Schema(description = "Additional data to use to bootstrap a connection between devices, in standard unpadded base64.",
|
||||
implementation = String.class)
|
||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@Size(max = 4096)
|
||||
@Nullable byte[] deviceTransferBootstrap) {
|
||||
|
||||
public enum Method {
|
||||
@Schema(description = "Restore account data from a remote message history backup")
|
||||
|
||||
Reference in New Issue
Block a user