diff --git a/ts/challenge.ts b/ts/challenge.ts index 9d8e45b59c2d..4275ec46e83f 100644 --- a/ts/challenge.ts +++ b/ts/challenge.ts @@ -46,7 +46,7 @@ type Handler = Readonly<{ }>; export type ChallengeData = Readonly<{ - type: 'recaptcha'; + type: 'captcha'; token: string; captcha: string; }>; @@ -259,7 +259,14 @@ export class ChallengeHandler { log.info(`${logId}: tracking ${conversationId} with no waitTime`); } - if (data && !data.options?.includes('recaptcha')) { + if ( + data && + !( + data.options?.includes('captcha') || + // 'recaptcha' is deprecated for removal in 90 days + data.options?.includes('recaptcha') + ) + ) { log.error(`${logId}: unexpected options ${JSON.stringify(data.options)}`); } @@ -384,7 +391,7 @@ export class ChallengeHandler { try { await this.sendChallengeResponse({ - type: 'recaptcha', + type: 'captcha', token: lastToken, captcha, }); diff --git a/ts/textsecure/WebAPI.ts b/ts/textsecure/WebAPI.ts index a6a6d88ce3f2..e8d3ac3e13db 100644 --- a/ts/textsecure/WebAPI.ts +++ b/ts/textsecure/WebAPI.ts @@ -1211,7 +1211,7 @@ export type ServerKeysType = { }; export type ChallengeType = { - readonly type: 'recaptcha'; + readonly type: 'captcha'; readonly token: string; readonly captcha: string; };