mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-27 20:24:32 +01:00
Remove plaintext device creation timestamp.
This commit is contained in:
committed by
Cody Henthorne
parent
9dcc704a9e
commit
eb7012b7ae
@@ -166,10 +166,10 @@ class LinkDeviceApi(
|
||||
* - 422: Bad inputs.
|
||||
* - 429: Rate-limited.
|
||||
*/
|
||||
fun setTransferArchive(destinationDeviceId: Int, destinationDeviceCreated: Long, cdn: Int, cdnKey: String): NetworkResult<Unit> {
|
||||
fun setTransferArchive(destinationDeviceId: Int, destinationDeviceRegistrationId: Int, cdn: Int, cdnKey: String): NetworkResult<Unit> {
|
||||
val body = SetLinkedDeviceTransferArchiveRequest(
|
||||
destinationDeviceId = destinationDeviceId,
|
||||
destinationDeviceCreated = destinationDeviceCreated,
|
||||
destinationDeviceRegistrationId = destinationDeviceRegistrationId,
|
||||
transferArchive = SetLinkedDeviceTransferArchiveRequest.TransferArchive.CdnInfo(
|
||||
cdn = cdn,
|
||||
key = cdnKey
|
||||
@@ -189,10 +189,10 @@ class LinkDeviceApi(
|
||||
* - 422: Bad inputs.
|
||||
* - 429: Rate-limited.
|
||||
*/
|
||||
fun setTransferArchiveError(destinationDeviceId: Int, destinationDeviceCreated: Long, error: TransferArchiveError): NetworkResult<Unit> {
|
||||
fun setTransferArchiveError(destinationDeviceId: Int, destinationDeviceRegistrationId: Int, error: TransferArchiveError): NetworkResult<Unit> {
|
||||
val body = SetLinkedDeviceTransferArchiveRequest(
|
||||
destinationDeviceId = destinationDeviceId,
|
||||
destinationDeviceCreated = destinationDeviceCreated,
|
||||
destinationDeviceRegistrationId = destinationDeviceRegistrationId,
|
||||
transferArchive = SetLinkedDeviceTransferArchiveRequest.TransferArchive.Error(error)
|
||||
)
|
||||
val request = WebSocketRequestMessage.put("/v1/devices/transfer_archive", body)
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
*/
|
||||
data class SetLinkedDeviceTransferArchiveRequest(
|
||||
@JsonProperty val destinationDeviceId: Int,
|
||||
@JsonProperty val destinationDeviceCreated: Long,
|
||||
@JsonProperty val destinationDeviceRegistrationId: Int,
|
||||
@JsonProperty val transferArchive: TransferArchive
|
||||
) {
|
||||
sealed class TransferArchive {
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
data class WaitForLinkedDeviceResponse(
|
||||
@JsonProperty val id: Int,
|
||||
@JsonProperty val name: String,
|
||||
@JsonProperty val created: Long,
|
||||
@JsonProperty val lastSeen: Long
|
||||
@JsonProperty val lastSeen: Long,
|
||||
@JsonProperty val registrationId: Int,
|
||||
@JsonProperty val createdAtCiphertext: String?
|
||||
)
|
||||
|
||||
@@ -17,10 +17,13 @@ public class DeviceInfo {
|
||||
public String name;
|
||||
|
||||
@JsonProperty
|
||||
public long created;
|
||||
public long lastSeen;
|
||||
|
||||
@JsonProperty
|
||||
public long lastSeen;
|
||||
public int registrationId;
|
||||
|
||||
@JsonProperty
|
||||
public String createdAtCiphertext;
|
||||
|
||||
public DeviceInfo() {}
|
||||
|
||||
@@ -32,11 +35,15 @@ public class DeviceInfo {
|
||||
return name;
|
||||
}
|
||||
|
||||
public long getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public long getLastSeen() {
|
||||
return lastSeen;
|
||||
}
|
||||
|
||||
public int getRegistrationId() {
|
||||
return registrationId;
|
||||
}
|
||||
|
||||
public String getCreatedAtCiphertext() {
|
||||
return createdAtCiphertext;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user