lilia
0ff38e41c2
Let keepalive listen to socket events
...
Wait until the socket connects before starting the keepalive timer.
Automatically stop the keepalive when the socket is closed.
// FREEBIE
2015-10-05 15:05:24 -07:00
lilia
1345899253
Use reject instead of throw
...
This ensures that the containing promise is rejected without triggering
the side effects of an uncaught exception, such as causing the debugger
to pause.
// FREEBIE
2015-10-03 23:19:53 -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
bc0c9bd133
Remove attachment host string replace
...
This host is no longer hard coded anywhere.
// FREEBIE
2015-10-02 18:00:40 -07:00
lilia
69bbaac3b9
Fix conversation model test
...
// FREEBIE
2015-10-02 15:13:13 -07:00
lilia
5eabfa2559
Fix libtextsecure tests
...
// FREEBIE
2015-10-02 15:08:21 -07:00
lilia
5bf608598c
Fix MessageSender prototype
...
// FREEBIE
2015-10-02 15:02:25 -07:00
lilia
b0da491025
Don't throw on unknown groups
...
// FREEBIE
2015-10-02 12:54:12 -07:00
lilia
b42626923c
Don't double-render key conflict errors
...
// FREEBIE
2015-10-02 12:35:28 -07:00
lilia
7ec4700431
Handle saving errors when none exist already
...
// FREEBIE
2015-10-02 12:35:28 -07:00
lilia
4cc7a30107
Remove error class when no more message errors
...
// FREEBIE
2015-10-02 12:15:25 -07:00
lilia
ae25d62ef2
Fix up post-conflict resolution error processing
...
// FREEBIE
2015-10-02 12:14:34 -07:00
lilia
d3812869d2
Don't throw errors from background
...
// FREEBIE
2015-10-02 12:14:10 -07:00
lilia
bbb5b24d6b
Fix disappearing conversation bug
...
Opening two message-detail views in two separate conversations would
disappear one of the conversations. Fixed by better encapsulating the
sub-views of a conversation.
// FREEBIE
2015-10-02 11:21:11 -07:00
lilia
8f003ea69d
Don't throw if sender is not a group member
...
This could happen if we simply failed to process an earlier group
update correctly.
// FREEBIE
2015-10-02 10:43:34 -07:00
lilia
4a1d0ebdb9
Pass bytebuffer to axolotlInstance
...
// FREEBIE
2015-10-02 00:03:49 -07:00
lilia
46c9a7fafb
Fix tryMessageAgain
...
// FREEBIE
2015-10-02 00:02:18 -07:00
lilia
08b864b57c
Fix standalone registration
...
// FREEBIE
2015-10-01 22:04:07 -07:00
lilia
9872b59355
Simplify filter predicate
...
Untangle a double negative to make this line shorter and easier to read.
// FREEBIE
2015-10-01 21:11:41 -07:00
lilia
0fa1069a93
Don't throw on duplicate members in a group update
...
Fixes #364
// FREEBIE
2015-10-01 21:11:41 -07:00
lilia
1aee065c2c
Fix registration
...
Previously would fail to register keys by using the wrong username.
The username should be <number>.<deviceid> once we've confirmed our
account and received a deviceId from the server.
// FREEBIE
2015-10-01 20:43:30 -07:00
lilia
978b3d1a98
DRY up tryMessageAgain
...
// FREEBIE
2015-10-01 18:43:20 -07:00
lilia
fbb65d1988
Add replayable network errors
...
Support for manual message retry.
// FREEBIE
2015-10-01 18:43:20 -07:00
lilia
bc03bdbfc4
Move tryMessageAgain to MessageReceiver
...
`tryMessageAgain` is the routine called when re-trying a message that
failed to decrypt due to an IncomingIdentityKeyError. This handling
needs to move to MessageReceiver because it depends on
`processDecrypted` to handle incoming message protos, which depends
on a server instance in order to download attachments.
// FREEBIE
2015-10-01 18:43:19 -07:00
lilia
0fc673f25f
Refactor sendmessage for prototypality
...
// FREEBIE
2015-10-01 18:43:18 -07:00
lilia
868695558d
Throw on bad server url
...
// FREEBIE
2015-10-01 18:43:18 -07:00
lilia
e30ac86c8a
Remove deleted file from concatentation list
...
// FREEBIE
2015-10-01 18:43:17 -07:00
lilia
c8a1e090d2
Move handleAttachment and processDecrypted
...
Make these internal methods on MessageReceiver. Todo: refactor
identity key errors to use a given message receiver.
// FREEBIE
2015-10-01 18:43:07 -07:00
lilia
a8f4bac2f7
Let makeAttachmentPointer resolve falsey arguments
...
Internalizing this pattern to the makeAttachmentPointer function lets us
DRY it up throughout the file.
// FREEBIE
2015-10-01 18:33:50 -07:00
lilia
e626355e0c
Let background page instantiate AccountManagers
...
Remove the need to expose the server url config as a global.
// FREEBIE
2015-10-01 18:33:49 -07:00
lilia
edd76ec65a
AccountManager takes a url
2015-10-01 18:33:49 -07:00
lilia
9de23a967b
Fix dropping the first websocket message
2015-10-01 18:33:49 -07:00
lilia
3fcd980c23
Add websocket error and close event handlers
2015-10-01 18:33:49 -07:00
lilia
78956ede2f
Disable keepalive if we disconnect the socket
2015-10-01 18:33:48 -07:00
lilia
9e9d767a30
Add MessageSender
...
textsecure.MessageSender takes server url and credentials and returns
a message sending interface configured for that server.
Used a wrapper function to insert a TextSecureServer instance into
sendmessage.js code at runtime. This will result in function duplication
between different MessageSender objects, pending further refactoring to
use prototypal inheritence.
// FREEBIE
2015-10-01 18:33:48 -07:00
lilia
98aa5156b0
Refactor TextSecureServer for storage
...
Following the pattern from previous commit, let the server class accept
a url and login credentials from the caller. Then integrate into
MessageReceiver and AccountManager.
// FREEBIE
2015-10-01 18:33:48 -07:00
lilia
09bd6c7824
Lint
...
// FREEBIE
2015-10-01 18:33:33 -07:00
lilia
19423bf909
Abstract message error handling
...
// FREEBIE
2015-10-01 18:21:20 -07:00
lilia
e1c9e28b4c
Add comment
...
// FREEBIE
2015-10-01 10:55:04 -07:00
lilia
569d0655fa
Fix test failure
...
// FREEBIE
2015-09-30 19:32:25 -07:00
lilia
1c306df61f
Workaround for #363 Multiple open sessions bug
...
This doesn't solve the problem in the general case, but should at least
unbreak registration.
// FREEBIE
2015-09-30 18:47:42 -07:00
lilia
876e11c19b
Fix sync messages not getting displayed on arrival
...
// FREEBIE
2015-09-30 17:52:13 -07:00
lilia
7d6adc4879
Save outgoing error codes when messages fail
...
// FREEBIE
2015-09-30 17:13:59 -07:00
lilia
a802322d44
Display a default message for incoming message errors
...
An exception to the previous commit, for incoming messages we should not
show a mysterious empty bubble. Instead there is some generic
non-technical error message.
// FREEBIE
2015-09-30 15:24:34 -07:00
lilia
929c16090b
Move error messages to message detail view
...
Change how message errors are rendered. Errors associated with a number
will be shown under that number in the detail view rather than piling up
in the message bubble.
// FREEBIE
2015-09-30 14:27:18 -07:00
lilia
9a63703340
Close the socket/keepalive when going offline
...
// FREEBIE
2015-09-30 14:22:07 -07:00
lilia
c1b9f3235f
Save all errors
...
But clean up objects created by the Error constructor, as they contain
non-serializable properties, like functions.
// FREEBIE
2015-09-30 14:22:07 -07:00
lilia
37ff3cf5a8
Change http logging
...
Printing method + url again makes it easier to match requests to
responses when scanning logs.
// FREEBIE
2015-09-30 14:21:52 -07:00
lilia
0f8aff12c5
Refactor contact rendering in message detail view
...
DRY
// FREEBIE
2015-09-30 14:21:52 -07:00
lilia
b8536679b3
Stop keepalive when socket closes
...
// FREEBIE
2015-09-30 14:21:10 -07:00