Commit graph

3088 commits

Author SHA1 Message Date
Scott Nonnenberg fb7701576e Update autosize, which should fix stack overflow error (#1560)
* Update to the latest version of autosize.js

* gitignore: Restrict 'dist' matches to the root dist folder

The global search for 'dist' caused problems when updateing bower
components.

* A couple minor version updates: ByteBuffer, filesize, intlTel

moment-with-localse, ProtoBuf
2017-10-13 11:44:35 -07:00
Axel 3dc3667b45 Add setting to hide menu bar (#1551)
* Add setting to hide menu bar

Add a setting in the themes section to hide the menu bar.
The menu bar is not needed in everyday use and might not fit in with
signals dark theme. The hidden menu bar can still be shown by pressing
alt.
autoHideMenuBar is added to windowConfig and saved and restored on
startup to prevent flickering.

* Trigger events only when related setting changes

Set the event to trigger on instanciation of the view.
Notification settings no longer reapply the theme or menu bar settings.

* Save window state when closing the window

When not moving or resizing the window, no BrowserWindow config would be
created and saved.
2017-10-13 11:39:18 -07:00
Scott Nonnenberg 019ffba10b
v1.0.30
Add 100MB file size limit for arbitrary file types (#1555)
Fully eliminate debug from imported data (#1556)

FREEBIE
2017-10-11 15:47:02 -07:00
Scott Nonnenberg f95c65acac Add 100MB file size limit for arbitrary file types (#1555)
Previously we only had limits for audio, video, and image files.

FREEBIE
2017-10-11 14:41:51 -07:00
Scott Nonnenberg e2d9d855fb Fully eliminate debug from imported data (#1556)
FREEBIE
2017-10-11 14:41:32 -07:00
Scott Nonnenberg 26bff0db52
v1.0.29
Feature: Blue check marks for read messages if opted in (#1489)

Re-enable import by excluding 'debug' items from export (#1532)

Better handling of network disconnection/reconnection on Linux (#1546)

Load debug log dialog immediately, then populate log data (#1540)

Fix audio notifications on Linux (#1526)

Re-enable fullscreen on OSX (#1525)

Fix vertically-aligned onboarding progress text (#1547)

Fix broken file icon when attaching non-image (#1548)

Deployment:
  - Standardize artifact names - include platform name (#1539)
  - Update electron-updater and supply it with windows/publisherName
    (#1535)
  - Use cdn endpoint for auto update (#1538)

Dev:
  - Override console.log in main process, handle non-strings (#1536)
  - window.onerror: move to proper window.log.error call (#1528)
  - Remove duplicate definition of getSyncRequest (#1530)
  - Ensure locale is 'en' when NODE_ENV=test (#1527)

FREEBIE
2017-10-10 08:50:35 -07:00
Scott Nonnenberg b44f23cc98 Show proper icon when attachment is not an image (#1548)
FREEBIE
2017-10-10 08:49:29 -07:00
Lilia 24f3763836 i18n group updates (#1549)
// FREEBIE
2017-10-10 08:49:12 -07:00
Scott Nonnenberg c2fa61d0b4 Make .status CSS rules more specific to fix onboarding text (#1547)
FREEBIE
2017-10-06 17:04:39 -07:00
Scott Nonnenberg b64f2969fd Better handling of network disconnection/reconnection (#1546)
* Ensure that our preload.js setImmediate call finds right function

FREEBIE

* Our own socket close event, better logging, unregistration

FREEBIE

* Return CLOSED for NetworkStatusView if we've fully disconnected

* background.js: Remove messageReceiver = null, log in connect()

A null messageReciever makes the NetworkStatusView think we're online.

FREEBIE
2017-10-06 16:28:13 -07:00
Lilia 52cc8355a6 Feature: Blue check marks for read messages if opted in (#1489)
* Refactor delivery receipt event handler

* Rename the delivery receipt event

For less ambiguity with read receipts.

* Rename synced read event

For less ambiguity with read receipts from other Signal users.

* Add support for incoming receipt messages

Handle ReceiptMessages, which may include encrypted delivery receipts or read
receipts from recipients of our sent messages.

// FREEBIE

* Rename ReadReceipts to ReadSyncs

* Render read messages with blue double checks

* Send read receipts to senders of incoming messages

// FREEBIE

* Move ReadSyncs to their own file

// FREEBIE

* Fixup old comments on read receipts (now read syncs)

And some variable renaming for extra clarity.

// FREEBIE

* Add global setting for read receipts

Don't send read receipt messages unless the setting is enabled.
Don't process read receipts if the setting is disabled.

// FREEBIE

* Sync read receipt setting from mobile

Toggling this setting on your mobile device should sync it to Desktop. When
linking, use the setting in the provisioning message.

// FREEBIE

* Send receipt messages silently

Avoid generating phantom messages on ios

// FREEBIE

* Save recipients on the outgoing message models

For accurate tracking and display of sent/delivered/read state, even if group
membership changes later.

// FREEBIE

* Fix conversation type in profile key update handling

// FREEBIE

* Set recipients on synced sent messages

* Render saved recipients in message detail if available

For older messages, where we did not save the intended set of recipients at the
time of sending, fall back to the current group membership.

// FREEBIE

* Record who has been successfully sent to

// FREEBIE

* Record who a message has been delivered to

* Invert the not-clickable class

* Fix readReceipt setting sync when linking

* Render per recipient sent/delivered/read status

In the message detail view for outgoing messages, render each recipient's
individual sent/delivered/read status with respect to this message, as long as
there are no errors associated with the recipient (ie, safety number changes,
user not registered, etc...) since the error icon is displayed in that case.

*Messages sent before this change may not have per-recipient status lists
and will simply show no status icon.

// FREEBIE

* Add configuration sync request

Send these requests in a one-off fashion when:
  1. We have just setup from a chrome app import
  2. We have just upgraded to read-receipt support

// FREEBIE

* Expose sendRequestConfigurationSyncMessage

// FREEBIE

* Fix handling of incoming delivery receipts - union with array

FREEBIE
2017-10-04 15:28:43 -07:00
Scott Nonnenberg ffbcb4ecb5 Load debug log dialog immediately, then populate log data (#1540)
An immediate response to the user request to see the log, and then we
show the real data as soon as we've loaded it from disk.

Changes:
  - the IPC exchange to get the log data is now async
  - the API to fetch the log on the client side now returns a Promise
  - in the main process, the only disk access done synchronoously is
    reading the contents of the log directory. The JSON parsing of the
    resultant log data is now split up into three chunks.
  - We only send three keys from each log item to the renderer process:
    msg, time, level. Previously we sent the entire log entry with extra
    keys: hostname, pid, name.

FREEBIE
2017-10-04 14:40:35 -07:00
Lilia 670d2afa69 Standardize artifact names - include platform name (#1539)
* Standardize artifact names

// FREEBIE

* Update name of windows asset in Grunt fetch-release task

FREEBIE
2017-10-04 14:17:07 -07:00
Scott Nonnenberg 0291882328 Update electron-updater and supply it with windows/publisherName (#1535)
This ensures that the signing certificate of any binary pulled down as
part of auto-update on Windows is in the CA chain (not self-signed) and
has the right publisherName. electron-updater also rejects any unsigned
binary when asked to check the publisherName.

FREEBIE
2017-10-04 14:05:23 -07:00
Lilia 8ec63e70d8 Use cdn endpoint for auto update (#1538)
This will make electron-updater use the cdn-fronted updates.signal.org instead
of the s3 endpoint. You can verify it worked by looking at the url generated in
dist/latest-mac.json and dist/win-unpacked/resources/app-update.yml

// FREEBIE
2017-10-04 14:04:52 -07:00
Scott Nonnenberg fb674529f4 Override console.log in main process, handle non-strings (#1536)
This should allow us to get an insight into auto-update behavior and
other low-level behaviors happening in the Electron process which would
be useful for debugging.

FREEBIE
2017-10-04 14:03:59 -07:00
Lilia 0b7543b0f6 Fix audio notifications on linux (#1526)
This partially reverts commit 1b444a5e23.
Because support for system-level notification sound settings is inconsistent
across Win/Linux/OSX, do the simplest thing that will produce consistent
behavior on all platforms: suppress the system sound by always passing the
`silent: true` option, and play our own sound clip (copied from ios).

// FREEBIE
2017-10-03 11:08:14 -07:00
Lilia 5e6d3156f9 Ensure locale is 'en' when NODE_ENV=test (#1527)
Beacause so many of our tests have hardcoded english strings. We could do
better, but for now anyone running tests locally must simply do so in english,
even if they usually use Signal in another language.

// FREEBIE
2017-10-03 11:08:06 -07:00
Lilia 23700e1776 Re-enable fullscreen on OSX (#1525)
* Re-enable fullscreen on OSX

We were inadvertantly disabling the fullscreen button due to a quick of the
BrowserWindow api. Add some guards to make sure we no longer save or use a
previously-stored `fullscreen: false` in our window configs.

// FREEBIE

* Use logger.info instead of console.log

Note the use of stringify to make config object safe for bunyan
https://github.com/trentm/node-bunyan#log-method-api

// FREEBIE
2017-10-03 11:07:40 -07:00
Scott Nonnenberg 3c45e9c350 Remove 'debug' from the list of stores we import (#1532)
Now that we log to disk, we no longer need the debug object store from
the Chrome export.

FREEBIE
2017-10-03 11:06:47 -07:00
Lilia 99cf82d01a Remove duplicate definition of getSyncRequest (#1530) 2017-10-02 14:13:54 -07:00
Scott Nonnenberg f070bc4299 window.onerror: move to proper window.log.error call (#1528)
FREEBIE
2017-10-02 14:13:27 -07:00
Scott Nonnenberg 03f8c2c4e0
v1.0.28
No changes; this release is to test auto-upgrade signature verification
on Windows.

FREEBIE
2017-09-29 16:56:50 -07:00
Scott Nonnenberg 68070561f8
v1.0.27
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
2017-09-29 11:07:43 -07:00
Scott Nonnenberg 38152042d5 Ensure final message before 'empty' is ready for notification (#1522)
Without this change, there's a race condition for the notification we
show when we get the 'empty' event after a large backlog download. Four
messages may have come in, but the last might not be notified. So the
count shown would be three. And then, when the final message's notify()
call finishes, another notification would be shown.

FREEBIE
2017-09-29 09:58:37 -07:00
Scott Nonnenberg 10a38297b8 Only show notifications when done with sync (#1507)
This prevents the parade of notifications if a machine wakes up from
sleep. Basically covers situations that the loading screen doesn't
already.

When disabled, notifications will be cached until they are subsequently
re-enabled, at which time all the pending notifications will be summarized.

From the background page, notifications are disabled during connection attempts
until an empty event. This means we can always safely call conversation.notify
to queue a notification for the next batch, dropping some options from message
and conversation model methods.

We've also moved the calls to check window focus and draw attention to the
window, which were previously included in the conversation model, but are now
performed by the Notification system, because the time that the notification is
displayed might be some time after the message is added by the conversation, so
decisions about focus and attention should be made in that moment and not
before.

// FREEBIE
2017-09-29 09:15:28 -07:00
Scott Nonnenberg 3b4fd2d0e0 Eliminate $name$ in two places (#1520)
* Eliminate $name$ when changedRightAfterVerify string is shown

FREEBIE

* Eliminate $name$ when identityKeyErrorOnSend string is shown

FREEBIE
2017-09-29 09:09:40 -07:00
Scott Nonnenberg 8b60212c12 Update strings for fa, no, pt_BR, pt_PT, ro, zh_CN, zh_TW (#1517)
Also, remove unneeded (and potentially brittle) title from support link
in importError string.

FREEBIE
2017-09-28 17:44:41 -07:00
Scott Nonnenberg 29053059b2 Update electron to v1.6.14 to get security fix (#1519)
https://electron.atom.io/blog/2017/09/27/chromium-rce-vulnerability-fix

FREEBIE
2017-09-28 17:44:29 -07:00
Scott Nonnenberg 95c85010c4 Only retry messages on startup, not every sockect reconnect (#1510)
FREEBIE
2017-09-28 14:58:45 -07:00
Scott Nonnenberg 2d650bd627 Further workaround to try to push node.js event loop forward (#1511)
FREEBIE
2017-09-28 14:47:49 -07:00
Scott Nonnenberg 6323f598b5 Disconnect from socket faster on loss of network access (#1512)
* Disconnect from socket faster on complete loss of network access

Today we wait for a keepalive request to fail; this change forces
disconnect in the case that the browser tells us that we're now offline.

FREEBIE

* MessageReceiver: don't react to errors after explicit close()

FREEBIE
2017-09-28 13:12:43 -07:00
Scott Nonnenberg b0f9644c14 Add certificate name for windows code-signing (#1513)
* 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
2017-09-28 11:58:45 -07:00
lilia 234e9c14e0 Remove manifest.json from Gruntfile 2017-09-27 18:18:20 +02:00
Scott Nonnenberg 3a3f2495e0 No longer need manifest.json. Removing.
FREEBIE
2017-09-27 18:17:45 +02:00
Lilia 9f82a37d8b Log call messages instead of throwing error (#1504)
Rather than throw an error, just log call messages and drop them. This way we
distinguish them from incorrectly encoded content messages or new types of
messages we don't support yet, and don't insert unnecessary red flags and
stacktraces in debug logs.

// FREEBIE
2017-09-25 16:42:56 -07:00
Scott Nonnenberg 314b29e426
Redact group ids in logging
FREEBIE
2017-09-25 16:41:57 -07:00
Scott Nonnenberg 4c48d12dc3
Remove unused grunt tasks: sauce labs and connect
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
2017-09-25 15:38:27 -07:00
Scott Nonnenberg ba2df1f95b
jshint: Turn on ES6 mode, fix a few issues in new logging file
FREEBIE
2017-09-25 15:32:31 -07:00
Scott Nonnenberg 6b11f67dc6
Move logging to disk via bunyan
- 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
2017-09-25 15:00:34 -07:00
Scott Nonnenberg 33f5a804fe
v1.0.26
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
2017-09-22 12:05:50 -07:00
Scott Nonnenberg 9db0cb49c4 setTimeout/setImmediate workaround for linux hangs (#1497)
FREEBIE
2017-09-22 11:06:52 -07:00
Lilia 42f2142e36 Fix RangeError on non-file drag/drop events (#1498)
ConversationView responds to drag/drop events by forwarding them to its file
input. The file input stops propagation and handles the event only if the data
transfer is type file. This means that any other data type (text, img, etc...)
causes an recursive loop of event propagation, eventually resulting in logging a
"RangeError: Maximum call stack size exceeded".

Fix by only forwarding files to the file input.

// FREEBIE
2017-09-22 09:44:09 -07:00
Scott Nonnenberg bd78016120 script to build for electron on install, Electron docs refresh (#1491)
* Add new postinstall script for automatic electron builds

FREEBIE

* Documentation refresh for the world of electron

FREEBIE
2017-09-19 15:31:04 -07:00
Scott Nonnenberg 9040677d3c Update our release scripts to match changes in electron-builder (#1484)
No more win-unpacked/linux-unpacked, so we need to extract downloaded
zips into their own folders manually.

FREEBIE
2017-09-18 15:51:01 -07:00
Scott Nonnenberg 2786baf2b5 Additional logging when we can't decrypt a user's profile (#1483)
Found a number of 'Illegal buffer' errors in an Electron log submitted
today. As far as I can tell, these same profiles are succeedig for me,
so it's time to collect more data.

FREEBIE
2017-09-18 15:33:08 -07:00
Scott Nonnenberg c420c597f9 Remove images/emoji directory (#1485)
FREEBIE
2017-09-18 15:31:00 -07:00
Scott Nonnenberg bf3eb6d30c
v1.0.25
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
2017-09-15 13:32:48 -07:00
Lilia 4449a5f110 Upgrade emoji support (#1482)
* 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
2017-09-15 13:22:11 -07:00
Scott Nonnenberg c6d461c579
Bypass often-corrupt node_modules/.bin/grunt.cmd on windows (#1481)
FREEBIE
2017-09-15 10:20:29 -07:00