Commit Graph

68 Commits (f63c85f5d5a82b6b5e870f36eb59e5f898ec22bc)

Author SHA1 Message Date
Matthew Chen cc78978be5 Update fronting to use country-specific Google domains.
// FREEBIE
9 years ago
Matthew Chen 2438bd16c5 Add Iran, Oman, Cuba to censorship list.
// FREEBIE
9 years ago
Matthew Chen 52762a1be9 Clean up.
// FREEBIE
9 years ago
Michael Kirk 78515377b1 Censorship circumvention in Egypt and UAE
* domain fronting
* non-websocket message fetching
* alternate pinning policy for google hosted reflector server

// FREEBIE
9 years ago
Michael Kirk b1ebfa9873 Revert "WIP: Censorship circumvention in Egypt and UAE"
This reverts commit f1ade83c3f.

No quite ready yet.
9 years ago
Michael Kirk f1ade83c3f WIP: Censorship circumvention in Egypt and UAE
* non-websocket message fetching

// FREEBIE
9 years ago
Michael Kirk b6676fb029 Better error messages when failure to send due to:
- no internet
- unregistered recipient

// FREEBIE
9 years ago
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
9 years ago
Michael Kirk c5edc9997a Production log level to INFO (#34)
// FREEBIE
9 years ago
Michael Kirk 65e6778033 log network manager requests
// FREEBIE
9 years ago
Michael Kirk a99fde4d3b Device manager
// FREEBIE
9 years ago
Michael Kirk 9093be2b0d Device provisioning
// FREEBIE
9 years ago
Michael Kirk 4d52d28e06 Use non-deprecated method for sending data.
No copying required in our case since we've just built the data for only
this purpose.

// FREEBIE
9 years ago
Michael Kirk 1d0b645fc9 Update to new protocol (#23)
* new protobufs from libsignal-service-java@a1c93edc40e3ce201fa4e70339a3e6f4e197e319
* Makefile to build ObjC classes from *.proto
* refactored some touched code to minimize duplication
* removed unused protos
* deleted some dead code
* renamed method for clarity

// FREEBIE
9 years ago
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
9 years ago
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
9 years ago
Michael Kirk 8058951b08 Adapt to updated SocketRocket pod refactorings. (#11)
While trying to pull in upstream changes to our fork of SocketRocket I
noticed we're publishing it/installing it from CocoaPods trunk, but
there's no need to do that.

Also, due to upstream refactoring, the actual included file has
changed.

// FREEBIE
10 years ago
Frederic Jacobs 5d91a5bd4f Init Commit 10 years ago