HomePhabricator
Diffusion Comm 3f492de73aac

[native] Fix hermes throwing on nonexistant files

Description

[native] Fix hermes throwing on nonexistant files

Summary: issue: https://linear.app/comm/issue/ENG-6929/sqlite-database-deletion-was-triggered-by-detecting-corrupted-database

Test Plan:
tested that if the file doesn't exist authoritativeKeyserverID is 256 and it is possible to logout and back in
Tested that if the file exists and authoritativeKeyserverID is correctly set

Checked that

const {
    authoritativeKeyserverID: keyserverID,
    // $FlowExpectedError: file might not exist
  } = require('./facts/authoritative_keyserver.json');

throws if the file doesn't exist, so authoritativeKeyserverID is not being set to undefined

Reviewers: michal, tomek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D11157

Details

Provenance
inkaAuthored on Feb 23 2024, 7:05 AM
Reviewer
tomek
Differential Revision
D11157: [native] Fix hermes throwing on nonexistant files
Parents
rCOMM5a38af1e5a29: [lib] Update getDefaultAvatar and threadMembersWithoutAddedAshoat
Branches
Unknown
Tags
Unknown