Update to the new gv2 capability string

This commit is contained in:
Scott Nonnenberg 2020-09-25 13:19:03 -07:00 committed by GitHub
parent f2f2b20a52
commit 58af7adeaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -1905,9 +1905,9 @@
} }
} }
const hasRegisteredGV22Support = 'hasRegisteredGV22Support'; const hasRegisteredGV23Support = 'hasRegisteredGV23Support';
if ( if (
!storage.get(hasRegisteredGV22Support) && !storage.get(hasRegisteredGV23Support) &&
textsecure.storage.user.getUuid() textsecure.storage.user.getUuid()
) { ) {
const server = WebAPI.connect({ const server = WebAPI.connect({
@ -1915,8 +1915,8 @@
password: PASSWORD, password: PASSWORD,
}); });
try { try {
await server.registerCapabilities({ 'gv2-2': true }); await server.registerCapabilities({ 'gv2-3': true });
storage.put(hasRegisteredGV22Support, true); storage.put(hasRegisteredGV23Support, true);
} catch (error) { } catch (error) {
window.log.error( window.log.error(
'Error: Unable to register support for GV2.', 'Error: Unable to register support for GV2.',

View file

@ -1257,7 +1257,7 @@ export function initialize({
const { accessKey } = options; const { accessKey } = options;
const jsonData: any = { const jsonData: any = {
capabilities: { capabilities: {
'gv2-2': true, 'gv2-3': true,
}, },
fetchesMessages: true, fetchesMessages: true,
name: deviceName ? deviceName : undefined, name: deviceName ? deviceName : undefined,