Make long-lived socket connections more reliable (#1511)
Show offline state faster on loss of network access (#1512)
Notifications:
- Only show notifications when a large backlog download is complete
(#1507)
- Ensure final message before 'empty' is ready for notification
(#1522)
Ensure we always replace $name$ variable in strings (#1520)
Update strings for fa, no, pt_BR, pt_PT, ro, zh_CN, zh_TW (#1517)
Update electron to v1.6.14 to get security fix (#1519)
Eliminate warning on Windows installation with code-signing (#1513)
Dev:
- Move logging to disk via bunyan - should make message processing
faster! (#1506)
- Only retry messages on startup, not every reconnect (#1510)
- Log call messages instead of throwing error (#1504)
- Redact group ids in logging
(4c48d12dc3)
- Remove manifest.json from project
(3a3f2495e0)
FREEBIE
* Add certificate name for windows code-signing
electron-builder supports our extended validation code-signing cert, but
only on windows. Our release process must now include a signing step on
windows.
FREEBIE
* AppVeyor Remove certificateSubjectName to disable signing
* Move code-signing disable package.json updates above build
* AppVeyor: Use temporary holding file for package.json changes
We can't run our tests in a standalone server anymore, so no need for
connect.
Similarly, sauce labs is no longer necessary because all of our tests
are run locally inside of Electron.
FREEBIE
- Logging is available in main process as well as renderer process, and
entries all go to one set of rotating files. Log entries in the
renderer process go to DevTools as well as the console. Entries from
the main process only show up in the console.
- We save three days of logs, one day per file in %userData%/logs
- The 'debug' object store is deleted in a new database migration
- Timestamps and level included in the new log we generate for publish
as well as the devtools
- The bunyan API is exposed via windows.log (providing the ability to
log at different levels, and save objects instead of just text), so we
can move our code to it over time.
FREEBIE
Fix extended periods of not receiving messages on Linux (#1497)
Fix crash on non-file drag/drop events (#1498)
Dev:
- yarn install now builds electron dependencies automatically
(#1491)
- Docs are refreshed for the new world of Electron (#1491)
- Update our release scripts to match changes in electron-builder
(#1484)
- Additional logging when we can't decrypt a user's profile (#1483)
- Remove images/emoji directory (#1485)
FREEBIE
Update to Emojiset 4.0 (#1482)
Fix unthemed Submit Debug Log dialog (#1479)
Additional logging to help track down socket disconnect problems
(#1469)
Dismiss loading screen if we have network problems (#1466)
Setup:
On network error during setup, show error screen instead of hanging
(#1472)
Allow user to setup new install with pre-profiles mobile device
(#1470)
Ensure that we stay pinned to Windows taskbar on upgrade (#1473)
Ensure we are in the right category on Linux (#1473)
Ensure that we Heavye the right icon in the GNOME taskbar (#1473)
Transifex config specific to electron, updated translations (#1478)
CI:
Bypass often-corrupt node_modules/.bin/grunt.cmd on windows (#1481)
AppVeyor: Reduce build output due to xcopy of all emoji files
(c2c9cd0aa2)
FREEBIE
* Upgrade emoji deps and move to node_modules
Add support for Emoji 3.0 and switch from bower to yarn for managing emoji
dependencies.
// FREEBIE
* Delete old emoji deps
// FREEBIE
* Don't copy emoji on windows
It is no longer necessary since the symlinked image dir is gone.
// FREEBIE
* Update emoji test
// FREEBIE
* Fix emoji tests; remove all overrides of emoji-js functions
FREEBIE
* Update electron-builder and config, grunt-exec, and spellchecker
electron-builder is a major update: ^18.8.1 -> ^19.27.3
Fixes#1463, where we lose the user's decision to pin to taskbar
The other three are all minor changes, but it's generally good to stay
up to date.
FREEBIE
* Add category for our Linux build target
Fixes#1460, though the recommended list of categories doesn't seem to
match what is shown in Linux Mint. Hopefully it understands that
what was previously 'Networking' should now be 'Internet'
Standard list:
https://standards.freedesktop.org/menu-spec/latest/apa.html
FREEBIE
* Add StartupWMClass to .desktop file so GNOME can find running app
Fixes#1432
FREEBIE
Contact profiles support - display avatars and names (#1453)
Audio notes can now be recorded on Windows (#1456)
When window is snap-positioned on windows, no longer automatically
re-position window (#1455)
Ensure that our sound setting applies for all notification types (#1445)
Fix loading screen hang with application is unlinked (#1440)
Fix error dialog on initial load (#1440)
Based on https://github.com/WhisperSystems/Signal-Desktop/releases/tag/v0.43.3
FREEBIE
Rebased on v0.42.3, with two additional changes.
Certificate pinning via node XMLHttpRequest implementation (#1394)
Import: Wait until db writes resolve before saying we're done (#1401)
FREEBIE
* Add certificate pinning on https service requests
Make https requests to the server using node apis instead of browser apis, so we
can specify our own CA list, which contains only our own CA.
This protects us from MITM by a rogue CA.
As a bonus, this let's us drop the use of non-standard ports and just use good
ol' default 443 all the time, at least for http requests.
// FREEBIE
* Make certificateAuthorities an option on requests
Modify node-based xhr implementation based on driverdan/node-XMLHttpRequest,
adding support for setting certificate authorities on each request.
This allows us to pin our master CA for requests to the server and cdn but not
to the s3 attachment server, for instance. Also fix an exception when sending
binary data in a request: it is submitted as an array buffer, and must be
converted to a node Buffer since we are now using a node based request api.
// FREEBIE
* Import node-based xhr implementation
Add a copy of https://github.com/driverdan/node-XMLHttpRequest@86ff70e, and
expose it to the renderer in the preload script.
In later commits this module will be extended to support custom certificate
authorities.
// FREEBIE
* Support "arraybuffer" responseType on requests
When fetching attachments, we want the result as binary data rather than a utf8
string. This lets our node-based XMLHttpRequest honor the responseType property
if it is set on the xhr.
Note that naively using the raw `.buffer` from a node Buffer won't work, since
it is a reuseable backing buffer that is often much larger than the actual
content defined by the Buffer's offset and length.
Instead, we'll prepare a return buffer based on the response's content length
header, and incrementally write chunks of data into it as they arrive.
// FREEBIE
* Switch to self-signed server endpoint
* Log more error info on failed requests
With the node-based xhr, relevant error info are stored in statusText and
responseText when a request fails.
// FREEBIE
* Add node-based websocket w/ support for custom CA
// FREEBIE
* Support handling array buffers instead of blobs
Our node-based websocket calls onmessage with an arraybuffer instead of a blob.
For robustness (on the off chance we switch or update the socket implementation
agian) I've kept the machinery for converting blobs to array buffers.
// FREEBIE
* Destroy all wacky server ports
// FREEBIE
Order of operations is now:
- regenerate local assets
- clean the release dir
- download linux/windows releases
- build osx release
- smoke all test releases
// FREEBIE
npm run icon-gen and grunt (run default task) can be grouped into one
operation.
Use SIGNAL_ENV instead of NODE_ENV since Setting NODE_ENV adversely
affects yarn's install behavior, so we had to set it after the install
and before the build. By using a custom variable instead, we can set it
globally and eventually use it in a build matrix.
Move mas build to its own npm script
// FREEBIE
These modules together allow us to import css files from third party
components without maintaining symlinks that essentially rename them as
sass partials, which doesn't work on windows.
// FREEBIE
This corresponds to CFBundleVersion in the mac build. It must be
incremented every time we upload a new build to the app store for the
current release version.
// FREEBIE
Either icon-gen or local scaling of images was producing a corrupted and
glitchy .icns file. With this module, we need only provide a 1024px
image and it handles the scaling and generation of all other icon
assets.
// FREEBIE
Add the buildExpiration config and add it to the renderer's config
object. Use grunt to write the build expiration to
config/local-production.json which will override the default value (no
expiration) in production. Finally, run this grunt task as part of the
build process.
// FREEBIE
Add environment-specific configs under `./config` and integrate with the
build system. Also changes package.json `files` from blacklist to
whitelist.
// FREEBIE
Spaces in the file name get escaped to %20. Then the percent sign gets
escaped again on the way to s3 upload, such that the object name on s3
ends up as %2520. To fix this, we can simply omit spaces from our
artifact names.
// FREEBIE
Move these to where the build expects them to be.
In theory electron-builder should generate these from a build/icon.icns
but that doesn't seem to be working.
// FREEBIE
`npm run icon-gen` builds icon files from png files in the images
directory, outputting to build/icon.{ico,icns} (the expected location
for electron-builder).
// FREEBIE
Set NODE_ENV at run time or build time to switch the app between dev and
production modes.
At build time, the current NODE_ENV will be included in the packaged
app's package.json file. At runtime we read NODE_ENV from package.json,
but also allow the local environment variable to override. A query
string parsed by a preload script exposes the value to the renderer,
which then determines whether we use the staging or production server.
Additionally, different environments have different user data
directories.
// FREEBIE
In package.json, define our main entry point for electron, and add a
node script to start it up.
Add main.js from Electron/electron-quick-start with two modifications.
1. Load background.html instead of index.html
2. Disable node integration in the renderer
At this point we can load the background page in a window
with `npm start`, though it currently breaks on missing chrome app APIs.
// FREEBIE
Set up grunt with tasks for:
* preen - deletes unused files from bower_components, configured in
bower.json
* concat - concatenates preened bower components, configured
automagically from the preen config
It's worth noting that this setup assumes the order of files within a
package doesn't matter. This is usually true since we often include only
one file from the package.