Commit graph

18 commits

Author SHA1 Message Date
Scott Nonnenberg
3ea3e4e256 Contact sharing: protos and data pipeline
As of this commit: 82b76ccf37
2018-05-07 19:09:55 -07:00
Daniel Gasienica
1dd87ad197 Format all source code using Prettier 2018-04-30 16:53:34 -04:00
Scott Nonnenberg
c02860af5c
Responding to pull request review feedback
- messages.getQuoteObjectUrl: early return
- backup.js: explaining variables for long if statement
- types/messages.js: Log if thumbnail has neither data nor path
- sendmessage.js:
  - remove extraneous logging
  - fix indentation
  - upload attachments and thumbnails in parallel
- preload: don't load fs for tests, just fse
- _conversation.scss: split two selectors into two lines, 0px -> 0
- backup_test.js: use fse.existsSync and comment twoSlashes regex
- network_tests_view_test.js: Comment duplicate assignment to window.getSocketStatus
2018-04-23 15:36:47 -07:00
Scott Nonnenberg
a7d44d3344
Backup and end-to-end test! 2018-04-20 15:24:04 -07:00
Scott Nonnenberg
978ff0e2bb
Refactor: Use correct name for sanitized filename in backup.js 2018-04-20 15:24:02 -07:00
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