diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryPasswords.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryPasswords.java index 36c1a868d..927545194 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryPasswords.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryPasswords.java @@ -89,9 +89,8 @@ public class RegistrationRecoveryPasswords extends AbstractDynamoDbStore { return asyncClient.transactWriteItems(TransactWriteItemsRequest.builder() .transactItems( - buildPutRecoveryPasswordWriteItem(number, expirationSeconds, data.salt(), data.hash()) - // buildPutRecoveryPasswordWriteItem(phoneNumberIdentifier.toString(), expirationSeconds, data.salt(), data.hash()) - ) + buildPutRecoveryPasswordWriteItem(number, expirationSeconds, data.salt(), data.hash()), + buildPutRecoveryPasswordWriteItem(phoneNumberIdentifier.toString(), expirationSeconds, data.salt(), data.hash())) .build()) .thenRun(Util.NOOP); } diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryTest.java index 8424db754..ce612eaa4 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/storage/RegistrationRecoveryTest.java @@ -82,12 +82,12 @@ public class RegistrationRecoveryTest { assertEquals(ORIGINAL_HASH.hash(), saltedTokenHashByNumber.get().hash()); } - /* { + { final Optional saltedTokenHashByPni = registrationRecoveryPasswords.lookup(PNI).get(); assertTrue(saltedTokenHashByPni.isPresent()); assertEquals(ORIGINAL_HASH.salt(), saltedTokenHashByPni.get().salt()); assertEquals(ORIGINAL_HASH.hash(), saltedTokenHashByPni.get().hash()); - } */ + } } @Test @@ -107,12 +107,12 @@ public class RegistrationRecoveryTest { assertEquals(ORIGINAL_HASH.hash(), saltedTokenHashByNumber.get().hash()); } - /* { + { final Optional saltedTokenHashByPni = registrationRecoveryPasswords.lookup(PNI).get(); assertTrue(saltedTokenHashByPni.isPresent()); assertEquals(ORIGINAL_HASH.salt(), saltedTokenHashByPni.get().salt()); assertEquals(ORIGINAL_HASH.hash(), saltedTokenHashByPni.get().hash()); - } */ + } } @Test @@ -127,12 +127,12 @@ public class RegistrationRecoveryTest { assertEquals(ANOTHER_HASH.hash(), saltedTokenHashByNumber.get().hash()); } - /* { + { final Optional saltedTokenHashByPni = registrationRecoveryPasswords.lookup(PNI).get(); assertTrue(saltedTokenHashByPni.isPresent()); assertEquals(ANOTHER_HASH.salt(), saltedTokenHashByPni.get().salt()); assertEquals(ANOTHER_HASH.hash(), saltedTokenHashByPni.get().hash()); - } */ + } } @Test