Always use sender certificates including UUID

This commit is contained in:
Ken Powers 2020-05-07 16:51:37 -04:00 committed by GitHub
parent 7a55c68c6c
commit d6d2d242d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 69 deletions

View file

@ -1702,25 +1702,26 @@
}
}
const hasRegisteredUuidSupportKey = 'hasRegisteredUuidSupport';
if (
!storage.get(hasRegisteredUuidSupportKey) &&
textsecure.storage.user.getUuid()
) {
const server = WebAPI.connect({
username: USERNAME || OLD_USERNAME,
password: PASSWORD,
});
try {
await server.registerCapabilities({ uuid: true });
storage.put(hasRegisteredUuidSupportKey, true);
} catch (error) {
window.log.error(
'Error: Unable to register support for UUID messages.',
error && error.stack ? error.stack : error
);
}
}
// TODO: uncomment this once we want to start registering UUID support
// const hasRegisteredUuidSupportKey = 'hasRegisteredUuidSupport';
// if (
// !storage.get(hasRegisteredUuidSupportKey) &&
// textsecure.storage.user.getUuid()
// ) {
// const server = WebAPI.connect({
// username: USERNAME || OLD_USERNAME,
// password: PASSWORD,
// });
// try {
// await server.registerCapabilities({ uuid: true });
// storage.put(hasRegisteredUuidSupportKey, true);
// } catch (error) {
// window.log.error(
// 'Error: Unable to register support for UUID messages.',
// error && error.stack ? error.stack : error
// );
// }
// }
const deviceId = textsecure.storage.user.getDeviceId();