Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert papers/contacts to CipherData instead of CipherResponse #184

Merged
merged 6 commits into from
Apr 22, 2024

Commits on Apr 20, 2024

  1. feat: Add toPaperData and toContactData methods

    We did not implement these methods that allow to create a CipherData
    from a Cipher.
    
    But we will need them soon to convert more easily paper and contact
    to ciphers.
    
    We also complete toFieldData method.
    zatteo committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    86e3ba8 View commit details
    Browse the repository at this point in the history
  2. feat: Convert papers/contacts to CipherData instead of CipherResponse

    We were converting papers/contacts to CipherResponse because it is the model used by default during the sync.
    
    Here we choose to convert to CipherData instead because :
    - it will help us add a fallback to the sync. When papers/contacts sync will fail, we will be able to use the previous papers/contacts stored locally (they are stored as CipherData)
    - the conversion is simplier (it involves less classes)
    - we can still inject our papers/contacts during the sync thanks to the upsert method
    zatteo committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    6b98ae7 View commit details
    Browse the repository at this point in the history
  3. feat: Reuse stored papers/contacts if sync when vault locked

    We need the encryption key to convert papers/contacts. So if we try to do a sync when the vault is locked, we will have no papers/contacts. In some case, another sync is triggered when we unvault the lock, but if we unlock the vault when the previous sync is still in progress AND previous sync already passed the papers/contacts conversion (which failed), it can result to empty papers/contacts.
    
    In this case, we want to reuse stored papers/contacts.
    zatteo committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    ec20b3d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    36d25e3 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Configuration menu
    Copy the full SHA
    b399c7a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    da18f36 View commit details
    Browse the repository at this point in the history