Skip to content

Commit

Permalink
Remove optout_check request parameter
Browse files Browse the repository at this point in the history
Parameter is no longer required by the server, the same behaviour is the default.
  • Loading branch information
dcaunt committed Aug 15, 2024
1 parent a381e93 commit c4c0c3f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions sdk/src/main/java/com/uid2/data/IdentityRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ internal fun IdentityRequest.toPayload(): String {

return JSONObject().apply {
put(payloadKey, payloadValue)

// If the identity has opted out, we will get an opt-out response.
put(PARAM_OPT_OUT_CHECK, 1)
}.toString()
}

private const val PARAM_EMAIL_HASH = "email_hash"
private const val PARAM_PHONE_HASH = "phone_hash"
private const val PARAM_OPT_OUT_CHECK = "optout_check"
5 changes: 0 additions & 5 deletions sdk/src/test/java/com/uid2/data/IdentityRequestTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class IdentityRequestTest {
assertNotNull(jsonPayload)
assertTrue(jsonPayload.has(FIELD_EMAIL_HASH))
assertEquals(hash, jsonPayload[FIELD_EMAIL_HASH])
assertTrue(jsonPayload.has(FIELD_OPT_OUT_CHECK))
assertEquals(1, jsonPayload[FIELD_OPT_OUT_CHECK])
}

@Test
Expand All @@ -54,13 +52,10 @@ class IdentityRequestTest {
assertNotNull(jsonPayload)
assertTrue(jsonPayload.has(FIELD_PHONE_HASH))
assertEquals(hash, jsonPayload[FIELD_PHONE_HASH])
assertTrue(jsonPayload.has(FIELD_OPT_OUT_CHECK))
assertEquals(1, jsonPayload[FIELD_OPT_OUT_CHECK])
}

private companion object {
const val FIELD_EMAIL_HASH = "email_hash"
const val FIELD_PHONE_HASH = "phone_hash"
const val FIELD_OPT_OUT_CHECK = "optout_check"
}
}

0 comments on commit c4c0c3f

Please sign in to comment.