Commit Graph

160 Commits (699b364ec72ba340843d02e92ca66d6d0bf1054a)

Author SHA1 Message Date
Michael Kirk fff061ff3f Make sure WebRTC preferences are synced *every* call
This slows the UI, but only for people who have locally opted into
WebRTC calls, and the alternative is that users are likely to have stale
settings the first time a pair of people opt-in.

// FREEBIE
8 years ago
Michael Kirk d3e6747499 Merge remote-tracking branch 'origin/master' into feature/webrtc 8 years ago
Michael Kirk 4e72ab92c8 Prevent session corruption by using a single serial queue for encrypt and decrypt
coordinate SignalProtocol encryption/decryption on a single serial
queue. Previously message sending encrypted on the sending thread, while
message receiving decrypted on the main thread.

// FREEBIE
8 years ago
Michael Kirk a6029f2545 Merge remote-tracking branch 'origin/master' into feature/webrtc 8 years ago
Michael Kirk c2fae986f2 [SSK] better logging when we fail to get DB keys
// FREEBIE
8 years ago
Michael Kirk 9516ab1106 Bail on startup if DB password is inaccessible
Most likely this would be  because the user hasn't unlocked their device
since last restart.

This behavior existed once before, but the startup ordering is pretty
delicate. So, we're now redundantly checking in SSK in case this
delicate startup logic gets mis-ordered again.

Also fixed the AppDelegate method to check for the proper
applicationState, since it will never be "active" in didFinishLaunching.

fixes https://github.com/WhisperSystems/Signal-iOS/issues/1627

// FREEBIE
8 years ago
Michael Kirk 0e7083ed4e [SSK] remove Cuba from domain fronting
Current implementation is blocked in Cuba, plus there are reports of
Signal working w/o domain fronting anyway.

// FREEBIE
8 years ago
Matthew Chen 1898b9fa19 Merge branch 'charlesmchen/fixWebsocket' into feature/webrtc 8 years ago
Matthew Chen ec16016386 Update to reflect merged SSK branch. 8 years ago
Matthew Chen a023d02ae2 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 9c4eda54f1 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen cb3f564446 Fix web socket issue.
// FREEBIE
8 years ago
Matthew Chen 773080b11b Update SSK pod to reflect merge of corresponding charlesmchen/webrtcSetting2 branch into mkirk/webrtc.
This branch updates SignalRecipient in ContactsUpdater.

// FREEBIE
8 years ago
Matthew Chen 654bdb1a85 Add WebRTC setting.
// FREEBIE
8 years ago
Matthew Chen 4a65a88512 Rework new call view.
// FREEBIE
8 years ago
Matthew Chen 26a6e391b3 Fix pod.
// FREEBIE
8 years ago
Michael Kirk a17873291b Fix up tests
// FREEBIE
8 years ago
Michael Kirk 647b2b37e9 WIP: WebRTC calling
* Ensure NotificationsManager has dependencies
    Otherwise it's easy to mess up the order of the required dependencies.
* move AccountManager into Environment, it's heavy to construct

// FREEBIE
8 years ago
Matthew Chen ee63e9116c Update to reflect changes in SSK https://github.com/WhisperSystems/SignalServiceKit/pull/85.
// FREEBIE
8 years ago
Matthew Chen 6106326b34 Update to reflect changes in SSK https://github.com/WhisperSystems/SignalServiceKit/pull/85.
// FREEBIE
8 years ago
Matthew Chen a70d5f88ba Fix build break related to SignalServiceKit pod.
// FREEBIE
8 years ago
Matthew Chen 2ce4d39f9e Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 2dac6c888a Update SignalServiceKit pod.
* Fetch messages when app becomes active.
8 years ago
Michael Kirk ddba843d44 Censorship circumvention in Egypt and UAE
* domain fronting
* non-websocket message fetching

// FREEBIE
8 years ago
Michael Kirk c4baf5a625 [SSK] Avoid bricking signal if a key is temporarily unreadable
// FREEBIE
8 years ago
Michael Kirk c3a22d7da6 [SSK] Fix contact sync when no thread to self exists
fixes #1497

// FREEBIE
8 years ago
Michael Kirk 32a05dabce [SPK] Update SignalProtocolKit (AxolotlKit) (#1549)
// FREEBIE
8 years ago
Michael Kirk e2d725a041 [SSK] Ignore messages with unknown Content
Most like it would indicate a new feature that this old client doesn't
understand. Otherwise we'd print an empty bubble.

// FREEBIE
8 years ago
Michael Kirk 753c445bfc [SSK] Update libphonenumber
// FREEBIE
9 years ago
Russ Shanahan e7126f8c60 Less confusing "#" avatar for unknown Contact instead of "+"
For consistency with the Android and Desktop client behavior.

* Show a placeholder avatar when no image, initials (#1512)

  If all we know about the user is their phone number, their avatar image
  is rendered as a placeholder. Previously, it would render the first few
  characters of their phone number as if they were initials (eg. "+")

* Rename, extend OWSContactsManager methods (#1512)

  Rename from: nameStringForPhoneIdentifier
           to: displayNameForPhoneIdentifier

  Also, add:
  - (BOOL)nameExistsForPhoneIdentifier:(NSString *)identifier;

  Which reports whether there's any "name" for a contact.

* Remove unused typedefs

  These aren't used in the project anymore, and they were causing
  compiling warnings due to a lack of nullability indication.

* Resolve some OWSContactsManager nullability warnings

  Did a pass through all of the existing nullability warnings in
  OWSContactsManager. Tried to pick descriptors that best reflected the
  behavior of the methods.

// FREEBIE
9 years ago
Russ Shanahan 81e1ec4b9e Compare both first and last names when sorting (#1487)
If two names have the same last name, ensure we fall back on the
first name when sorting them.

// FREEBIE
9 years ago
Josh Schneier 896dd026d2 Remove DJWActionSheet 9 years ago
Michael Kirk f30c733ef3 Custom contact picker for invite flow
Preferred to the system contact picker because:
1. removes "group" clutter from header, unlikely to be used much.
2. can select while searching
3. fixes unified contact problem where e.g.
   If only one of your contact has a phone number, they appear disabled
   when choosing to invite via messaging, even though the other linked
   contact *does* have a phone number.
4. label users w/o email so it's clearer why they can't be selected

Also:

* Twitter share-image was too tall

// FREEBIE
9 years ago
Michael Kirk 7120ca1192 Make sure we're laying out contact cell after assigning avatar
// FREEBIE
9 years ago
Michael Kirk 0aa226f3d1 [SSK] If a new message type is introduced, ignore it
rather than printing an empty bubble.

// FREEBIE
9 years ago
Michael Kirk de7752ab20 Revert 50abf4d02d
The real problem was addressed (or, worked around) here:
1eb234e8ba

// FREEBIE
9 years ago
Michael Kirk 9b2c03793c [SSK] explicit newlines in safety numbers
// FREEBIE
9 years ago
Michael Kirk ee29fff0da [SSK] Default to blocking changed Safety Numbers
// FREEBIE
9 years ago
Michael Kirk c5be8f2d88 Don't include phone number in scannable safety number QR code
also fixes #1455

// FREEBIE
9 years ago
Michael Kirk c2aa17e362 Changed Safety numbers no longer block communication
When your partner changes their identity key (e.g. by reinstalling),
you'll see a notice alongside their message, but it will no longer
prevent the message from showing. aka "non blocking".

Existing users will be opted into the previous blocking behavior.

This is configurable for all users in Settings > Privacy.

// FREEBIE
9 years ago
Michael Kirk 28a2a4610c Fix compiler warnings.
// FREEBIE
9 years ago
Michael Kirk 368db7e553 [SSK] Only need to fetch prekey once
Plus related rate limit translations

// FREEBIE
9 years ago
Michael Kirk 23c80748e6 Hide safety numbers until you've exchanged keys
// FREEBIE
9 years ago
Michael Kirk 1912fbde72 [SSK] Send group messages as long as one recipient is found
// FREEBIE
9 years ago
Michael Kirk c401f764ef [SSK] Fix crash on messaging unregistered user
// FREEBIE
9 years ago
Michael Kirk c6a2fbff23 Tapping corrupted message opens "session reset" activity
This action was previously hidden under a secret longpress gesture in
the fingerprint view controller.

Ideally we'd never receive corrupted messages, but at the point we do,
our sessions are out of whack, and the only recovery option is to reset.
Let's help our users do that.

* Resetting session sends END_SESSION message

  Otherwise the remote side wouldn't know we reset the session and will
  send us a message on the old ratchet.

* Don't reset their identity key when resetting sender ratchet.

* Updated translations

// FREEBIE
9 years ago
Michael Kirk 1dd06a5e6c Fix registration flow / Keep push tokens in sync
* Separate registering an account from registering for push notifications
  * Allows us to complete registration without prompting user for
    notification settings.

UX Changes
----------
* Automatically keep push tokens in sync on startup.
  Push tokens *can* change, though they rarely do. It happens more often
  for people switching between appstore/beta builds.

  fixes #1174

* Show alert with registration failure
  * add secret 8-tap debug log gesture to registration flow

* Move registration to separate flow
  * don't see flash of inbox when first launching

* show useful error messages when given wrong code / no code

* remove background fetch
  We werent using it, but only relying on a side effect of it which is
  no longer necessary.

Code Changes
------------

* More registration logging.

* Install PromiseKit with carthage

  Our dependencies are not yet framework compatible, so we can't use
  cocoapods.

* Merge preferences util "category" into superclass.

  The immediate reason for this is Swift interop was assuming optional
  types were not optional, and exploding when a value was nil.

  This is clearer anyway, since we were treating it like a subclass, and
  it was the only thing using the class anyway.

* auto-genstrings now searches *.swift (and *.h, which was previously
  broken) for translateable strings.

// FREEBIE
9 years ago
Michael Kirk cc8c8d61b4 [SSK] Update to prevent session corruption
// FREEBIE
9 years ago
Michael Kirk 50abf4d02d [JSQMVC] Fix crash on delete when under load.
Hack to fix https://github.com/jessesquires/JSQMessagesViewController/issues/1885

This doesn't happen often, but is reproducible under simulated message
churn (~50 insert/update/deletes randomly spaced over 10 seconds).

During performBatchUpdates, the collectionViewLayout can call
layoutAttributesForElementsInRect which can reference the just-deleted
item's
view. (The view presumably hasn't been deleted yet, but will be by the
time
performBatchUpdates is complete).

It's opaque how layoutAttributesForElementsInRect get's it's list of
views. I
can only speculate how this works based on debugging, but it seems that
the
CollectionFlowLayout keeps an internal list of item frames, which when
crashing
still contain items corresponding to the to-be-deleted items.

In any case, it seems like a bug that JSQMVC would ever attempt to get
layoutAttributes for an item which doesn't exist in the datasource.
9 years ago
Michael Kirk eded20f1f5 [SSK] Don't send empty message to self after changing disappearing timer
previously fixed in: SSK:91fcd01632a81f2aa67d2d94b97c68d519e6881a

But got lost in a rebase after moving TSMessagesManager+sendMessage to
OWSMessageSender.

// FREEBIE
9 years ago