mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 11:06:47 +00:00
Fix incorrect substitution of enumeration key names for capability names
This commit is contained in:
1 parent
f5a93574f6
commit
4af576668c
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -492,6 +492,6 @@ public class ProfileController {
|
||||
private static Map<String, Boolean> getAccountCapabilities(final Account account) {
|
||||
return Arrays.stream(DeviceCapability.values())
|
||||
.filter(DeviceCapability::includeInProfile)
|
||||
.collect(Collectors.toMap(Enum::name, account::hasCapability));
|
||||
.collect(Collectors.toMap(DeviceCapability::getName, account::hasCapability));
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -452,8 +452,8 @@ class ProfileControllerTest {
|
||||
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
|
||||
.get(BaseProfileResponse.class);
|
||||
|
||||
assertEquals(isDeleteSyncSupported, profile.getCapabilities().get(DeviceCapability.DELETE_SYNC.name()));
|
||||
assertEquals(isVersionedExpirationTimerSupported, profile.getCapabilities().get(DeviceCapability.VERSIONED_EXPIRATION_TIMER.name()));
|
||||
assertEquals(isDeleteSyncSupported, profile.getCapabilities().get("deleteSync"));
|
||||
assertEquals(isVersionedExpirationTimerSupported, profile.getCapabilities().get("versionedExpirationTimer"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user