Quite a few other fixes, including:
- Sending to contact with no avatar yet (not synced from mobile)
- Left pane doesn't update quickly or at all on new message
- Left pane doesn't show sent or error status
Also:
- Contributing.md: Ensure set of linux dev dependencies is complete
We missed a couple directories with previous attempts to turn this on
globally: app/ and libtextsecure/
Not to mention files in places we didn't expect: ts files that weren't
in the ts directory!
This turns prettier on for every file we care about (js, ts, tsx, md)
everywhere in the project but for a few key parts.
No more errors like this in the logs!
```
INFO 2018-01-05T18:33:15.942Z Message.saveErrors: null Error
at file:///C:/Users/Test/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:30:33
at file:///C:/Users/Test/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:138:3
at file:///C:/Users/Test/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:40718:3
```
It has no information in the title, and then the callstack points to
the `new Error()` line in the old `errors.js`.
This change will include the actual error name and message details in
the stack, and will include the original http error stack as well if
provided.
Fix bug where resending due to failed network connection would fail
silently.
Broken in 7b6820 refactor which changed arguments to transmitMessage
// FREEBIE
Split into separate encrypt and transmit functions. Let the encryption
function also handle all wire formatting (ie, jsonification and base64
encoding), which simplifes TextSecureServer.sendMessages, removes a
TODO, and lets us save fewer params to make network errors replayable.
// FREEBIE
1. Return the value returned by the registered function, to expose the
underlying promise to the caller.
2. Stop accepting extra arguments to the replay function. The caller
should be able to do what they want with the returned promise instead.
3. Add a timestamp argument to the outgoing case, needed to re-try
sending a message.