mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 17:29:38 +01:00
Revert "Revert "Represent device names as byte arrays""
This reverts commit 45848e7bfe.
This commit is contained in:
committed by
Jon Chambers
parent
45848e7bfe
commit
4c9efdb936
@@ -221,7 +221,10 @@ class AuthEnablementRefreshRequirementProviderTest {
|
||||
|
||||
final int initialDeviceCount = account.getDevices().size();
|
||||
|
||||
final List<String> addedDeviceNames = List.of("newDevice1", "newDevice2");
|
||||
final List<String> addedDeviceNames = List.of(
|
||||
Base64.getEncoder().encodeToString("newDevice1".getBytes(StandardCharsets.UTF_8)),
|
||||
Base64.getEncoder().encodeToString("newDevice2".getBytes(StandardCharsets.UTF_8)));
|
||||
|
||||
final Response response = resources.getJerseyTest()
|
||||
.target("/v1/test/account/devices")
|
||||
.request()
|
||||
@@ -450,7 +453,7 @@ class AuthEnablementRefreshRequirementProviderTest {
|
||||
@PUT
|
||||
@Path("/account/devices")
|
||||
@ChangesDeviceEnabledState
|
||||
public String addDevices(@Auth TestPrincipal auth, List<String> deviceNames) {
|
||||
public String addDevices(@Auth TestPrincipal auth, List<byte[]> deviceNames) {
|
||||
|
||||
deviceNames.forEach(name -> {
|
||||
final Device device = DevicesHelper.createDevice(auth.getAccount().getNextDeviceId());
|
||||
|
||||
Reference in New Issue
Block a user