Commit Graph

50 Commits

Author SHA1 Message Date
Audric Ackermann c92baad736
Fix path building (#1903)
* Keep line breaks when message has some new lines

Relates #1758 and #1898 and #1901

* fix link preview cropped when received

* make sure we fetch from seed if we end up with not enough snodes

* try to download recent previews if we just trusted a user

* throw if we need to rebuild path while fetching snode list from snode

* fixup no refecthing of snode list while we are fetching them already

* added test for fetch from db or seed

* fetch snode list from snode every hour

also make sure the path building does not try to get more snodes. It
just throws

* do not drop a path if an opengroup room is down and we get errors  back

* do not throw an error if the snode in error in not in any path

* fix tests

* bump to v1.7.11
2021-09-13 17:07:53 +10:00
Audric Ackermann 09d9db38e8
move taskWithTimeout to typescript 2021-06-21 16:12:51 +10:00
Audric Ackermann c599d0b629
WIP 2021-05-17 14:39:56 +10:00
Audric Ackermann 58abd08e6d
Get snode from snode (#1614)
* force deleteAccount after 10sec timeout waiting for configMessage

* move some constants to file where they are used

* add a way to fetch snodes from snodes

* remove a snode from a pubkey's swarm if we get 421 without valid content

* remove getVersion from snodes

* hide groupMembers in right panel for non-group convo
2021-05-12 10:34:53 +10:00
Audric Ackermann 0c0da48150
remove pow 2021-04-28 15:24:45 +10:00
Audric Ackermann 66a6190f2b remove unused replyable error types 2021-02-19 17:47:13 +11:00
Audric Ackermann 8a800cf58c move the logic of handling when a message is sent to MessageSentHandler 2021-02-19 16:43:50 +11:00
Audric Ackermann 72c96ea998
remove most of the SessionProtocol unused stuff
- prekeys
- SessionCipher
- LokiCipher
- endSession and the reset Session logic
- what we called Sessionprotocol manager (to keep track of session with
everyone)
2021-01-18 10:58:34 +11:00
Audric Ackermann d43ae09eb0
first working version of closed group v2 2021-01-12 16:56:21 +11:00
Audric Ackermann 6fd8ea20c7
fix restoring of session after restore from seed 2020-11-06 14:44:04 +11:00
Audric Ackermann 53433261d9
remove outgoing_message.js and everything related to it 2020-07-13 17:10:20 +10:00
Audric Ackermann 6a91d44e08
pass the db id to our messagesender message and clean a few files 2020-06-30 16:58:28 +10:00
Maxim Shishmarev 2a0130ff04 Multidevice support for medium groups 2020-05-29 17:47:39 +10:00
Maxim Shishmarev 02320334f0 Remove P2P 2020-01-30 11:47:37 +11:00
Beaudan Brown eec4f22b50 Add crypto helpers and public error 2019-08-28 17:08:32 +10:00
Beaudan 014558d939 Squash and clean of old PRs, move towards sending cleartext again 2019-08-08 14:56:52 +10:00
Maxim Shishmarev 09d279dd93 Show correct error on incorrect timestamp 2019-08-05 11:14:22 +10:00
sachaaaaa c53633e367 Clearnet p2p with https (no verification yet) 2019-06-28 12:09:46 +10:00
Beaudan d82b5e1998 Remove random snodes if they fail and then try again. Throw seed node error if getRandomSnodeAddress fails. Filter out 0.0.0.0 nodes. 2019-06-18 17:31:49 +10:00
Beaudan e520bf109a Persist PoW difficulty and update if get response from snodes 2019-06-03 13:37:34 +10:00
Beaudan fa7042c043 Added wrong swarm error which gets thrown if we receive a 421 error, update the swarm lists if we get one of those errors 2019-04-08 13:37:20 +10:00
Beaudan b09f2970fc Move NotFoundError to errors.js 2019-04-08 13:37:20 +10:00
Beaudan 531ee92dcb Updated messenger to work with slightly different storage server API and changed swarm requests to go through storage server 2019-04-08 13:37:20 +10:00
Beaudan 6656a89092 Cleaned up a lot of the logs, stop them from printing more than once etc 2019-03-13 12:05:47 +11:00
Beaudan 8c20a31dd4 Review suggestions 2019-03-01 12:50:45 +11:00
Mikunj Varsani 8b5106433f Update libtextsecure/errors.js
Co-Authored-By: BeaudanBrown <beau@loki.network>
2019-01-30 10:59:22 +11:00
Beaudan c83661ce3f Added DNS resolution error for when lokinet isn't working, now keeping track of the nodes that have been queried and not trying them again 2019-01-30 10:59:22 +11:00
Beaudan 561d60cfd5 Sending messages now in a while loop like retrieving messages, added a failureCount and only delete node urls if they fail 3 times 2019-01-30 10:59:22 +11:00
Mikunj 6bd2d3962e Linted files 2019-01-16 16:18:08 +11:00
Mikunj 6bcb259919 Added PoW error. 2018-12-19 14:05:57 +11:00
Scott Nonnenberg 3105b77475 Migrate to SQLCipher for messages/cache
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
2018-07-31 17:08:45 -07:00
Scott Nonnenberg 0774ba2903 Eslintify all of libtextsecure 2018-07-21 14:52:43 -07:00
Scott Nonnenberg 754d65ae2e Let's make it all pretty, shall we?
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.
2018-05-02 13:40:57 -07:00
Daniel Gasienica 95321e5d3e Remove Vim mode lines 2018-04-30 16:53:34 -04:00
Scott Nonnenberg 6464d0a5fa
Make errors more debuggable; capture correct stack, include name (#1944)
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.
2018-01-08 11:08:25 -08:00
Scott Nonnenberg 8700112f6d Decrypt any IncomingIdentityKeyError still sticking around
FREEBIE
2017-08-12 13:17:53 -07:00
lilia cd0fe7037b Add replayable error for signed key failure
Disable message sending if signed key updates fail too many times, but
allow the user to retry sending.

// FREEBIE
2017-02-16 18:06:19 -08:00
lilia 89d3b772d5 Define UnregisteredUserError class
// FREEBIE
2016-05-25 20:20:10 -07:00
lilia 7e82d1295c Handle attachment upload errors
Adds a new kind of replayable error that handles retry of pre-encryption
failures, e.g., attachment upload.

Fixes #485

// FREEBIE
2016-02-09 13:21:32 -08:00
lilia b00d5289cf Save message timestamp for resending
Fix bug where resending due to failed network connection would fail
silently.

Broken in 7b6820 refactor which changed arguments to transmitMessage

// FREEBIE
2015-11-29 18:02:37 -08:00
lilia 1065502770 Change key conflict error message
Include the contact's number in the message for more helpful debug log
output.

// FREEBIE
2015-10-28 13:46:03 -07:00
lilia 816a206892 Refactor sendMessageToDevices
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
2015-10-10 16:36:30 -07:00
lilia a32f3ff1f6 More work on replayable errors
Expose a button that does that retries outgoing messages if possible.

// FREEBIE
2015-10-02 18:31:07 -07:00
lilia fbb65d1988 Add replayable network errors
Support for manual message retry.

// FREEBIE
2015-10-01 18:43:20 -07:00
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
2015-09-07 14:58:42 -07:00
lilia c28b5408ab Plumb keys into outgoing conflicts 2015-07-20 16:13:17 -07:00
lilia cc303e0802 Update libaxolotl, handle untrusted identitykey
Previously we had no access to the new untrusted identity
for verification purposes.

// FREEBIE
2015-07-20 14:25:02 -07:00
lilia 7799bef86c Tweak key conflict error messages
Be generic, because sometimes it's not TextSecure, but Signal.
2015-05-07 17:43:30 -07:00
lilia e88d4d8170 Tweak replayable errors
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.
2015-03-18 16:29:01 -07:00
Matt Corallo 8ad1a38b5b Move js files around for libtextsecure split 2015-01-14 09:35:57 -10:00
Renamed from js/errors.js (Browse further)