Commit Graph

14 Commits

Author SHA1 Message Date
Matthew Chen
0f45f292a1 Add WebRTC setting.
// FREEBIE
2017-01-12 09:07:35 -05:00
Michael Kirk
d1aa253f87 WebRTC calling
* Stun server request
* settable TextSecureEnv
* nullability annotations for TSCall
* Better debug logging for message sending
* fixup tests and expiration time

// FREEBIE
2017-01-11 17:15:20 -05:00
Michael Kirk
78515377b1 Censorship circumvention in Egypt and UAE
* domain fronting
* non-websocket message fetching
* alternate pinning policy for google hosted reflector server

// FREEBIE
2016-12-21 09:56:48 -06:00
Michael Kirk
b1ebfa9873 Revert "WIP: Censorship circumvention in Egypt and UAE"
This reverts commit f1ade83c3f.

No quite ready yet.
2016-12-20 17:24:50 -06:00
Michael Kirk
f1ade83c3f WIP: Censorship circumvention in Egypt and UAE
* non-websocket message fetching

// FREEBIE
2016-12-20 17:23:44 -06:00
Michael Kirk
b6676fb029 Better error messages when failure to send due to:
- no internet
- unregistered recipient

// FREEBIE
2016-10-25 09:55:46 -04:00
Michael Kirk
4ba1e86ec1 Explain send failures for text and media messages
Motivation
----------
We were often swallowing errors or yielding generic errors when it would
be better to provide specific errors.

We also didn't create an attachment when attachments failed to send,
making it impossible to show the user what was happening with an
in-progress or failed attachment.

Primary Changes
---------------
- Funnel all message sending through MessageSender, and remove message sending
  from MessagesManager.
  - Record most recent sending error so we can expose it in the UI
  - Can resend attachments.
  - Update message status for attachments, just like text messages
- Extracted UploadingService from MessagesManager
  - Saving attachment stream before uploading gives uniform API for send vs.
    resend
  - update status for downloading transcript attachments
- TSAttachments have a local id, separate from the server allocated id
  This allows us to save the attachment before the allocation request. Which is
  is good because:
  1. can show feedback to user faster.
  2. allows us to show an error when allocation fails.

Code Cleanup
------------
- Replaced a lot of global singleton access with injected dependencies to make
  for easier testing.
- Never save group meta messages. Rather than checking before (hopefully) every
  save, do it in the save method.
- Don't use callbacks for sync code.
- Handle errors on writing attachment data
- Fix old long broken tests that weren't even running. =(
- Removed dead code
- Use constants vs define
- Port flaky travis fixes from Signal-iOS

// FREEBIE
2016-10-24 09:36:51 -04:00
Michael Kirk
c5edc9997a Production log level to INFO (#34)
// FREEBIE
2016-09-27 20:15:02 -04:00
Michael Kirk
65e6778033 log network manager requests
// FREEBIE
2016-09-13 12:26:12 -04:00
Michael Kirk
a99fde4d3b Device manager
// FREEBIE
2016-09-09 15:11:40 -04:00
Michael Kirk
9093be2b0d Device provisioning
// FREEBIE
2016-09-02 12:28:58 -04:00
Michael Kirk
664162fe24 Use SocketRocket pluggable policies (#15)
* Use SocketRocket pluggable policies

Pluggable policies are currently only in our fork, but pending upstream
PR: https://github.com/facebook/SocketRocket/pull/429

Also:
* rebased SocketRocket against latest upstream to incorporate bug fixes.
* adapt to new upstream API for error handling (vs previous exception throwing)
* renamed AFSecurityOWSPolicy -> OWSHTTPSecurityPolicy to differentiate
  it from OSWWebSocketSecurityPolicy
* Follow conventional singleton pattern with onceToken
* bump xcode version to play nice with SWIFT_NAME in SocketRocket

// FREEBIE
2016-06-30 20:39:01 -07:00
Michael Kirk
9ab38efe9e There is no longer a distinction between redphone/text secure users. (#12)
We only support voice+text clients 

* remove voice parameter since we always support voice
* test TSAttributes

Plus re-styled touched code:
* don't access ivars outside of init/dealloc
* remove unused code


// FREEBIE
2016-06-27 19:48:37 -07:00
Frederic Jacobs
5d91a5bd4f Init Commit 2015-12-22 15:51:11 +01:00