Matthew Chen
f036d75fcb
Avoid redundant "block list changed" sync messages in TSBlockingManager.
...
// FREEBIE
2017-03-31 13:43:18 -04:00
Matthew Chen
f5237ef5d1
Add TSBlockingManager.
...
// FREEBIE
2017-03-31 13:43:18 -04:00
Michael Kirk
2dbcfed3ba
Mark a stored session as unfresh
...
in case of YapDB object cache.
// FREEBIE
2017-03-31 12:37:06 -04:00
Michael Kirk
f4dfd65840
Debug method to print stored sessions
...
// FREEBIE
2017-03-31 12:37:06 -04:00
Michael Kirk
61fe71f0ca
MessageSender should be accessed as singleton
...
// FREEBIE
2017-03-30 12:48:36 -04:00
Michael Kirk
4b0c01c961
MessagesManager should only be accessible via it's shared singleton
...
Testers can add the verbose init to a category for injecting
dependencies.
// FREEBIE
2017-03-30 12:11:38 -04:00
Matthew Chen
e9d6a3747c
Fix sharing of oversize text messages.
...
// FREEBIE
2017-03-30 10:23:36 -04:00
Matthew Chen
12635c65c2
Improve support for arbitrary attachments.
...
// FREEBIE
2017-03-29 17:54:14 -04:00
Matthew Chen
53623adae8
Accept arbitrary incoming attachments.
...
// FREEBIE
2017-03-29 12:56:25 -04:00
Matthew Chen
49a24a4e6a
Improve handling of incomplete and failed attachment downloads.
...
// FREEBIE
2017-03-29 12:33:17 -04:00
Matthew Chen
bdde3c73c5
Improve handling of incomplete and failed attachment downloads.
...
// FREEBIE
2017-03-29 12:33:17 -04:00
Matthew Chen
36485c9461
Remove RedPhone code.
...
// FREEBIE
2017-03-29 12:23:05 -04:00
Matthew Chen
75fabe5c25
Add support for oversize text messages sent as attachments.
...
// FREEBIE
2017-03-27 18:06:25 -04:00
Matthew Chen
d38f6fbfd1
Filter out country codes properly.
...
// FREEBIE
2017-03-26 15:12:19 -04:00
Michael Kirk
f005b66fa5
code review: move unnecessary __block allocation
...
// FREEBIE
2017-03-24 16:29:58 -04:00
Matthew Chen
a730381424
Fix crash writing a "swift" NSData on iOS 9.
...
// FREEBIE
2017-03-24 14:39:10 -04:00
Matthew Chen
607dd9a2f2
Avoid YapDatabase deadlock in OWSMessageSender.
...
// FREEBIE
2017-03-23 17:14:16 -04:00
Michael Kirk
b73594b234
Better envelop logging.
...
Previously it was basically impossible to trace recipients in debug
logs.
// FREEBIE
2017-03-23 17:08:31 -04:00
Matthew Chen
5739f71bd4
Respond to CR.
...
// FREEBIE
2017-03-23 14:35:30 -04:00
Matthew Chen
c3d2ea7abd
Use a separate sending queue for each conversation.
...
// FREEBIE
2017-03-23 12:45:02 -04:00
Matthew Chen
62d52ce9a0
Fix “send to self operations never complete” issue.
...
// FREEBIE
2017-03-23 11:05:49 -04:00
Michael Kirk
d31cfe6fd6
Ensure existing sessions are invalidated when saving new identity
...
// FREEBIE
2017-03-22 22:02:30 -04:00
Matthew Chen
5846131976
Further refinements to phone number parsing.
...
// FREEBIE
2017-03-22 09:53:59 -04:00
Matthew Chen
7f681e964b
Improve logging around decryption exceptions.
...
// FREEBIE
2017-03-22 09:52:12 -04:00
Matthew Chen
a1e5019370
Respond to CR.
...
// FREEBIE
2017-03-22 09:38:33 -04:00
Matthew Chen
e92d40a127
Fix edge cases around the websocket lifecycle.
...
// FREEBIE
2017-03-22 09:37:53 -04:00
Matthew Chen
0f47dc6200
Fix edge cases around the websocket lifecycle.
...
// FREEBIE
2017-03-22 09:37:53 -04:00
Matthew Chen
04a3e4323c
Respond to CR.
...
// FREEBIE
2017-03-21 13:00:48 -04:00
Matthew Chen
8231f79977
Don’t check content length header until we’ve received at least one byte of the attachment download.
...
// FREEBIE
2017-03-21 09:49:51 -04:00
Matthew Chen
2c61943537
Abort attachment downloads of excessive size.
...
// FREEBIE
2017-03-20 18:16:57 -04:00
Michael Kirk
29a0597b0c
Only call sendMessage on main thread.
...
The proximate cause for this change was a failing assert in the recently
introduced call to `setBackgroundTaskIdentifier` which is synchronized
on the main thread.
But generally, to keep things simple, we prefer calling back on main
thread unless performance dictates otherwise.
// FREEBIE
2017-03-20 15:59:45 -04:00
Thomas Guillet
478b5b247a
Remove convoluted dependency
...
of PhoneNumberUtil to ContactsManagerProtocol
Also moved tests from Signal-iOS repository here.
2017-03-20 15:11:11 -04:00
Michael Kirk
58829e2162
ensure we don't interrupt sending by being backgrounded
...
// FREEBIE
2017-03-20 15:00:09 -04:00
Michael Kirk
e68ee28e51
Add clarifying asserts per code review
...
// FREEBIE
2017-03-20 14:57:05 -04:00
Michael Kirk
db15ff5e87
Save message before sending starts.
...
Otherwise the message doesn't get saved until it's in the queue.
Interestingly, this could also address some of the perceived lag
mentioned in: https://github.com/WhisperSystems/Signal-iOS/pull/1850
// FREEBIE
2017-03-20 14:53:42 -04:00
Michael Kirk
df51523a84
Serialize message sending and generalized retry logic.
...
Previously messages could be sent out of order if (e.g.)
1. You're on a slow network
2. You send a big attachment
3. You immediately send text
Generally in this scenario, the text will be sent before the attachment.
Also, introduced a more general retry loop to retry on *any* failure
during sending.
Previously the only retry logic was around the messages API on the
Signal Server.
Now we'll also retry failures when allocating an attachment, or
uploading an attachment.
TODO: remove the now redundant retry logic in the message sender?
TODO: there is still one place where we send messages directly through
the MessageSender, rather than via the operation - when resending to a
group due to a safety number change. This is separate logic because we
were being sure to *only* resend to that one recipient. Cleaning this up
would move a lot of code around.
Once Signal-Desktop implements timestamp based de-duping we could shave
that wart by having this troublesome codepath use NSOperation like
everything else.
// FREEBIE
2017-03-20 14:53:42 -04:00
Michael Kirk
d6af5028ca
Fix receiving attachments from old clients
...
Protobuf's null-object pattern provides an empty NSData when no digest
is provided rather than nil.
// FREEBIE
2017-03-20 14:48:45 -04:00
Matthew Chen
332833da7b
Respond to CR.
...
// FREEBIE
2017-03-16 13:53:06 -03:00
Matthew Chen
60e0ddfb92
Fix non-contact lookup for non-US users.
...
// FREEBIE
2017-03-16 13:31:14 -03:00
Matthew Chen
e12bd4773a
Fix non-contact lookup for non-US users.
...
// FREEBIE
2017-03-16 13:31:14 -03:00
Matthew Chen
d63a519c43
Fix filtering of country codes in registration flow.
...
// FREEBIE
2017-03-16 13:21:21 -03:00
Matthew Chen
c8efd83c39
Respond to CR.
...
// FREEBIE
2017-03-15 12:37:59 -03:00
Matthew Chen
88f343a0aa
Attempt to fix the "frequent attachment download errors with low server ids".
...
// FREEBIE
2017-03-15 12:17:54 -03:00
Matthew Chen
25ab52caf2
Respond to CR.
...
// FREEBIE
2017-03-15 10:54:45 -03:00
Matthew Chen
865d9d7b96
Add "is uploaded" property to attachment streams.
...
// FREEBIE
2017-03-15 10:17:41 -03:00
Matthew Chen
e4636e8336
Respond to CR.
...
// FREEBIE
2017-03-14 14:09:57 -03:00
Matthew Chen
958dbd199b
Minor clean up.
...
// FREEBIE
2017-03-14 13:34:20 -03:00
Matthew Chen
f40629ffa0
Improve alignment between socket state and socket manager state.
...
// FREEBIE
2017-03-14 13:34:20 -03:00
Michael Kirk
8f1412d502
comment constant time compare per code review
...
// FREEBIE
2017-03-13 12:32:35 -04:00
Michael Kirk
452110b687
Include digest in attachments
...
- constant time compare
- free buffer passed to NSData
// FREEBIE
2017-03-13 12:32:35 -04:00