mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-07-12 08:07:11 +01:00
Update ChallengeType
This commit is contained in:
+10
-3
@@ -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,
|
||||
});
|
||||
|
||||
@@ -1211,7 +1211,7 @@ export type ServerKeysType = {
|
||||
};
|
||||
|
||||
export type ChallengeType = {
|
||||
readonly type: 'recaptcha';
|
||||
readonly type: 'captcha';
|
||||
readonly token: string;
|
||||
readonly captcha: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user