Update to the new gv2 capability string

This commit is contained in:
Scott Nonnenberg 2020-09-22 17:30:25 -07:00 committed by GitHub
parent 943cb3eb1a
commit 04d3769bd4
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 hasRegisteredGV2Support = 'hasRegisteredGV2Support';
const hasRegisteredGV22Support = 'hasRegisteredGV22Support';
if (
!storage.get(hasRegisteredGV2Support) &&
!storage.get(hasRegisteredGV22Support) &&
textsecure.storage.user.getUuid()
) {
const server = WebAPI.connect({
@ -1915,8 +1915,8 @@
password: PASSWORD,
});
try {
await server.registerCapabilities({ gv2: true });
storage.put(hasRegisteredGV2Support, true);
await server.registerCapabilities({ 'gv2-2': true });
storage.put(hasRegisteredGV22Support, true);
} catch (error) {
window.log.error(
'Error: Unable to register support for GV2.',

View file

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