mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 09:28:11 +01:00
Allow primary devices to change names of linked devices
This commit is contained in:
@@ -5,25 +5,15 @@
|
||||
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import org.whispersystems.textsecuregcm.util.ByteArrayAdapter;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
public class DeviceName {
|
||||
|
||||
@JsonProperty
|
||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@NotEmpty
|
||||
@Size(max = 225)
|
||||
private byte[] deviceName;
|
||||
|
||||
public DeviceName() {}
|
||||
|
||||
public byte[] getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
public record DeviceName(@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@NotEmpty
|
||||
@Size(max = 225)
|
||||
byte[] deviceName) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user