Commit graph

13 commits

Author SHA1 Message Date
Daniel Gasienica
24f4ad53bc Use single quotes for identifiers 2018-04-11 15:54:32 -04:00
Daniel Gasienica
4c4443390a Rename createImporter to createAttachmentDataWriter 2018-04-04 19:11:46 -04:00
Daniel Gasienica
cfad983d08 Consistently use ciphertext instead of encrypted 2018-04-04 18:41:50 -04:00
Daniel Gasienica
a61c905146 Impliclity decrypt data if key is present 2018-04-04 18:41:50 -04:00
Daniel Gasienica
43ab320d31 Load attachments before writing them upon export 2018-04-04 18:41:50 -04:00
Daniel Gasienica
7eeabb5b1a Add precondition for writeAttachment 2018-04-04 18:41:50 -04:00
Daniel Gasienica
0faaf52b71 Import and upgrade messages upon save 2018-04-04 18:41:50 -04:00
Daniel Gasienica
cf7355bd2f Rename backupToDirectory to exportToDirectory
For symmetry reasons.
2018-04-04 18:41:50 -04:00
Scott Nonnenberg
cea42bde7d
Encryption support for backup and restore
Also moved to the _ prefix in backup.js for all private methods exported
for testing.
2018-03-20 11:53:54 -07:00
Scott Nonnenberg
6d8f4b7b6e
Backup: zipped messages.json, flat attachments dir
Backup creates, in a target directory:
  - An attachments folder, with all attachments, each named for their
    parent message's id - a GUID. If there is more than one attachment
    in a given message,  each attachment beyond the first will end with
    '-N', zero-indexed.
  - A file named messages.zip. It contains exactly what went to disk in
    the original export code, but zipped up.

Export is now only 'light,' and in this new messages.zip format.

Import supports both the new format and the old format. If the target
directory has a messages.zip file, we'll treat it as the new format.

Next up: Encrypting attachments and the messages.zip!
2018-03-20 11:53:22 -07:00
Scott Nonnenberg
153a22f46b
Exclude unnecessary data in export: profiles, replayable errors 2018-03-20 11:53:22 -07:00
Scott Nonnenberg
c0c758d459
Backup: All exports are now 'light' exports 2018-03-20 11:53:21 -07:00
Scott Nonnenberg
e583434366
Refactor: Move Backup under window.Signal 2018-03-20 11:53:19 -07:00