Remove deprecated endpoint
This commit is contained in:
parent
3a28aaab53
commit
89bdb68129
3 changed files with 7 additions and 34 deletions
|
@ -893,14 +893,6 @@ export async function startApp(): Promise<void> {
|
|||
]);
|
||||
}
|
||||
|
||||
if (window.isBeforeVersion(lastVersion, 'v1.26.0')) {
|
||||
// Ensure that we re-register our support for sealed sender
|
||||
await window.storage.put(
|
||||
'hasRegisterSupportForUnauthenticatedDelivery',
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
if (window.isBeforeVersion(lastVersion, 'v1.32.0-beta.4')) {
|
||||
drop(DataWriter.ensureFilePermissions());
|
||||
}
|
||||
|
@ -962,6 +954,12 @@ export async function startApp(): Promise<void> {
|
|||
await window.storage.remove('sendEditWarningShown');
|
||||
await window.storage.remove('formattingWarningShown');
|
||||
}
|
||||
|
||||
if (window.isBeforeVersion(lastVersion, 'v7.21.0-beta.1')) {
|
||||
await window.storage.remove(
|
||||
'hasRegisterSupportForUnauthenticatedDelivery'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
setAppLoadingScreenMessage(
|
||||
|
@ -1825,19 +1823,6 @@ export async function startApp(): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
const udSupportKey = 'hasRegisterSupportForUnauthenticatedDelivery';
|
||||
if (!window.storage.get(udSupportKey)) {
|
||||
try {
|
||||
await server.registerSupportForUnauthenticatedDelivery();
|
||||
await window.storage.put(udSupportKey, true);
|
||||
} catch (error) {
|
||||
log.error(
|
||||
'Error: Unable to register for unauthenticated delivery support.',
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const deviceId = window.textsecure.storage.user.getDeviceId();
|
||||
|
||||
if (!window.textsecure.storage.user.getAci()) {
|
||||
|
|
|
@ -587,7 +587,6 @@ const URL_CALLS = {
|
|||
storageToken: 'v1/storage/auth',
|
||||
subscriptions: 'v1/subscription',
|
||||
subscriptionConfiguration: 'v1/subscription/configuration',
|
||||
supportUnauthenticatedDelivery: 'v1/devices/unauthenticated_delivery',
|
||||
updateDeviceName: 'v1/accounts/name',
|
||||
username: 'v1/accounts/username_hash',
|
||||
reserveUsername: 'v1/accounts/username_hash/reserve',
|
||||
|
@ -619,7 +618,6 @@ const WEBSOCKET_CALLS = new Set<keyof typeof URL_CALLS>([
|
|||
// Devices
|
||||
'linkDevice',
|
||||
'registerCapabilities',
|
||||
'supportUnauthenticatedDelivery',
|
||||
|
||||
// Directory
|
||||
'directoryAuthV2',
|
||||
|
@ -1346,7 +1344,6 @@ export type WebAPIType = {
|
|||
genKeys: UploadKeysType,
|
||||
serviceIdKind: ServiceIdKind
|
||||
) => Promise<void>;
|
||||
registerSupportForUnauthenticatedDelivery: () => Promise<void>;
|
||||
reportMessage: (options: ReportMessageOptionsType) => Promise<void>;
|
||||
requestVerification: (
|
||||
number: string,
|
||||
|
@ -1763,7 +1760,6 @@ export function initialize({
|
|||
registerCapabilities,
|
||||
registerKeys,
|
||||
registerRequestHandler,
|
||||
registerSupportForUnauthenticatedDelivery,
|
||||
resolveUsernameLink,
|
||||
replaceUsernameLink,
|
||||
reportMessage,
|
||||
|
@ -2083,14 +2079,6 @@ export function initialize({
|
|||
});
|
||||
}
|
||||
|
||||
async function registerSupportForUnauthenticatedDelivery() {
|
||||
await _ajax({
|
||||
call: 'supportUnauthenticatedDelivery',
|
||||
httpType: 'PUT',
|
||||
responseType: 'json',
|
||||
});
|
||||
}
|
||||
|
||||
async function registerCapabilities(capabilities: CapabilitiesUploadType) {
|
||||
await _ajax({
|
||||
call: 'registerCapabilities',
|
||||
|
|
2
ts/types/Storage.d.ts
vendored
2
ts/types/Storage.d.ts
vendored
|
@ -73,7 +73,6 @@ export type StorageAccessType = {
|
|||
customColors: CustomColorsItemType;
|
||||
device_name: string;
|
||||
existingOnboardingStoryMessageIds: ReadonlyArray<string> | undefined;
|
||||
hasRegisterSupportForUnauthenticatedDelivery: boolean;
|
||||
hasSetMyStoriesPrivacy: boolean;
|
||||
hasCompletedUsernameOnboarding: boolean;
|
||||
hasCompletedUsernameLinkOnboarding: boolean;
|
||||
|
@ -188,6 +187,7 @@ export type StorageAccessType = {
|
|||
lastStartup: never;
|
||||
sendEditWarningShown: never;
|
||||
formattingWarningShown: never;
|
||||
hasRegisterSupportForUnauthenticatedDelivery: never;
|
||||
};
|
||||
|
||||
export type StorageInterface = {
|
||||
|
|
Loading…
Reference in a new issue