Allow primary devices to change names of linked devices

This commit is contained in:
Jon Chambers
2024-10-29 09:52:38 -04:00
committed by GitHub
parent 712f3affd9
commit f3b22e04e8
14 changed files with 231 additions and 41 deletions

View File

@@ -27,6 +27,14 @@ service Devices {
*/
rpc RemoveDevice(RemoveDeviceRequest) returns (RemoveDeviceResponse) {}
/**
* Sets the encrypted human-readable name for a specific devices. Primary
* devices may change the name of any device associated with their account,
* but linked devices may only change their own name. This call will fail with
* a status of `NOT_FOUND` if no device was found with the given identifier.
* It will also fail with a status of `PERMISSION_DENIED` if a linked device
* tries to change the name of any device other than itself.
*/
rpc SetDeviceName(SetDeviceNameRequest) returns (SetDeviceNameResponse) {}
/**
@@ -95,6 +103,11 @@ message SetDeviceNameRequest {
* device.
*/
bytes name = 1;
/**
* The identifier for the device for which to set a name.
*/
uint32 id = 2;
}
message SetDeviceNameResponse {}

View File

@@ -154,7 +154,7 @@ message GetPreKeysRequest {
* retrieve pre-keys. If not set, pre-keys are returned for all devices
* associated with the targeted account.
*/
uint32 device_id = 2;
optional uint32 device_id = 2;
}
message GetPreKeysAnonymousRequest {