- [x] Generate random file names.
- [x] Generate random file paths that prevent too many files per folder using
fan-out.
- [x] Create attachment directory in user data folder.
- [x] Investigate operating system file indexing on:
- [x] Windows: Confirmed that `AppData` is not indexed by default.
- [x] macOS: Confirmed that `~/Library` files are not indexed by default.
Searching system files using Spotlight requires multi-step opt-in:
https://lifehacker.com/5711409/how-to-search-for-hidden-packaged-and-system-files-in-os-x.
More info https://apple.stackexchange.com/a/92785.
Added `.noindex` suffix to `attachments` folder.
- [x] Linux: n/a
- [x] Save incoming attachment files to disk
- [x] On received
- [x] On sync
- [x] Save outgoing attachments files to disk before sending
- [x] Display attachments either from disk or memory in attachment view.
Be robust to multiple render passes.
- [x] Test that missing attachment on disk doesn’t break app.
Behavior: Message is displayed without attachment.
- [x] Delete attachment files when message is deleted.
Relates to #1589.
Using 2 hex characters [0-9a-f] will give us 16 * 16 = 256 root folders which
seems more manageable than 4096 (16^3). Assuming a user has 10,000 attachments,
they should roughly distribute at ~40 per folder with prefix length 2 rather
than ~2.5 per folder with a prefix of 3.
Using hashes, we get the benefit of deduplication but if a user receives two
messages with the same attachment, deleting one would delete it for both since
they are only stored once. To avoid the complexity of tracking number of
references, we simply generate random file names similar to iMessage on MacOS
(?) and Signal Android.
Some of our users submit direct PRs against our translations. This update to our PR template is meant to encourage them to contribute translations via Transifex.
Prompted by this user PR: https://github.com/signalapp/Signal-Desktop/pull/2156
Fixed: White block at bottom of conversation panel in iOS theme
(#2144 and #2153)
Fixed: Would attempt to rotate signed prekey every five seconds,
forever, after app discovers it is unlinked
(1c6d91b59c)
Dev:
- Introduce IndexedDB index on `messages` store tracking
`schemaVersion` (#2128)
- Preparation for encrypted backups
(cea42bde7d)
- Updates to structure of exported data - messages.zip, flat list of
attachments (6d8f4b7b6e)