Commit Graph

484 Commits

Author SHA1 Message Date
Matthew Chen
cce7a14e0c Rework app readiness. 2021-02-04 09:55:39 -03:00
Matthew Chen
645bd76bd5 Rework app readiness. 2021-02-04 09:55:39 -03:00
Jordan Rose
05725078f1 SSK: Migrate SSKSessionStore to Swift
This is a no-change migration /except/ that I've dropped entry points
that are unused in the app or tests.
2021-01-28 12:03:50 -08:00
Jordan Rose
f8c2b764a2 Update for the removal of SMKEnvironment 2021-01-28 12:03:50 -08:00
Matthew Chen
d82b6f8250 Create a new GRDB storage adapter after grdb schema migrations. 2021-01-27 09:45:12 -03:00
Matthew Chen
584a638993 Create a new GRDB storage adapter after grdb schema migrations. 2021-01-27 09:45:12 -03:00
Matthew Chen
025fc61cd7 Port attachment downloads logic to Swift. 2021-01-21 20:40:24 -03:00
Nora Trapp
08baf57151 Allow sharing to multiple threads 2021-01-12 15:33:54 -08:00
Michelle Linington
f9067bac8a Respect server received timestamp in group call message 2020-11-19 16:04:22 -08:00
Michelle Linington
daa28d413d Handle incoming GroupCallUpdate messages
This builds out infrastructure to fetch updated PeekInfo structs from
RingRTC on a GroupCallUpdate. There are still a bunch of TODOs to
resolve once RingRTC adds PeekInfo.
2020-11-19 16:02:22 -08:00
Nora Trapp
723ea9c95f Allow RingRTC to send/receive opaque call messages 2020-11-05 12:25:49 -08:00
Nora Trapp
46351cf16f Add notification when user joins / leaves call 2020-11-05 12:25:49 -08:00
Matthew Chen
fc30b0084b Enforce uniqueness when migrating SignalRecipients from YDB. 2020-10-02 09:47:42 -03:00
Christopher Kobusch
4715240cc1 Added custom notification sounds
* user can add custom notification sounds from Files app (aiff, wav, or caf files)
* former OWSSound enum is now named OWSStandardSound, OWSSound turned into an alias for NSUInteger
* custom sounds get IDs based on the hash of the file name
2020-09-23 14:54:23 -07:00
Matthew Chen
686aee752c Rename OWSMessageSender -> MessageSender. 2020-09-17 21:35:35 -03:00
Matthew Chen
819321e4ef Rename singleton accessors. 2020-09-17 21:11:09 -03:00
Matthew Chen
c017e76aab Rename singleton accessors. 2020-09-17 21:11:09 -03:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03:00
Matthew Chen
9aa17e833b Remote deprecation. 2020-09-02 16:51:58 -03:00
Nora Trapp
4b3908077b Migration to add serverDeliveryTimestamp 2020-08-20 16:48:54 -07:00
Nora Trapp
5457c37ba8 Handle x-signal-timestamp header 2020-08-20 16:48:54 -07:00
Matthew Chen
7c047d5798 Minor cleanup. 2020-08-19 10:51:57 -03:00
Nora Trapp
7137cf75b5 Don't use CallKit for video calls received while the app is active 2020-08-17 15:41:10 -07:00
Matthew Chen
73c8839061 Convert ContactsViewHelper to singleton. 2020-08-11 17:51:40 -03:00
Michelle Linington
a660a81d0f IOS-668: Reorganize how ContactsUpdater interacts with CDS operations
- Removes ContactsUpdater singleton. It wasn't really tracking much
  state anyway
- Introduces ContactDiscoveryTask. This creates a
  ContactDiscoveryOperation (modern or legacy) and updates the
  SignalRecipients database on completion. Returns a promise.
- Begin migrating away from operation queues

PromiseKit is weird about priority propogation, so this shouldn't be
used yet. Since all then closures are asynced, priorities don't
propogate down to underlying queues. This means the a
ContactDiscoveryTask on the main queue will not boost the priority on
the ModernContactDiscoverOperation's owned operation queue
2020-08-06 12:55:32 -07:00
Matthew Chen
11b2c14ccc Respond to CR. 2020-08-03 14:38:18 -03:00
Matthew Chen
e6e4709487 Merge branch 'release/3.13.3_' 2020-07-31 14:55:24 -03:00
Matthew Chen
39b35b8a6d Do not log unsatisfiable layout constraints.
Thanks Shaun Mirani of ISE for the bug report.
2020-07-31 14:07:04 -03:00
Matthew Chen
01296a1ade Tweak ydb-to-grdb migration. 2020-07-30 13:51:17 -03:00
Michelle Linington
e3e903a8ad IOS-631: Suppress message processing pipeline while we have a pending backfill operation
Creates a new root singleton: OWSMessagePipelineSupervisor

As of right now, this singleton has two responsibilities:
- Track all message processing pipeline stages that have registered
  themselves
- Post processing suspension updates to interested stages

Four classes will now register themselves as pipeline stages:
- OWSMessageContentQueue
- YAPDBMessageDecryptQueue
- IncomingGroupsV2MessageQueue
- SSKMessageDecryptJobQueue

At initialization, OWSMessagePipelineSupervisor will take out a pipeline
suspension while it waits for a UUIDBackfillTask to complete. Other
interested objects are also able to suspend the message processing
pipeline by invoking suspendMessageProcessing(for:) on the supervisor
(though, currently this is not used by anything except tests)

This also adds some supporting improvements to UnfairLock. Now,
UnfairLock closures will return the value returned from its critical
section closure.
2020-07-22 21:10:27 -07:00
Matthew Chen
f070a0e479 Clean up naming around profile fetches. 2020-07-08 11:10:37 -03:00
Matthew Chen
fc82a11ccf Clean up naming around profile fetches. 2020-07-08 11:04:01 -03:00
Matthew Chen
c49a977d3e Merge branch 'release/3.10.3' into release/3.11.0 2020-06-07 15:01:54 -03:00
Nora Trapp
ad64727ecc Evacuate early message cache after memory warning 2020-06-07 10:05:07 -07:00
Matthew Chen
07e0cf36ec Assert that writes occur on the main thread. 2020-06-07 11:45:47 -03:00
Matthew Chen
ba801f05ce Label the "slow write transactions" logging with the source of the transaction. 2020-06-07 10:37:55 -03:00
Matthew Chen
28ff9ac453 Rework model read caches. 2020-06-06 17:37:30 -03:00
Matthew Chen
6b4f192b1b Remove usage of retainUntilComplete. 2020-05-22 09:51:12 -03:00
Jim Gustafson
6806bd4d9f Adjust protocol definitions
Added a new field destinationDeviceId to the protocol buffer for
CallMessage.

Added supporting logic of setting it when sending.

Added a catch when receiving: If the field is defined, then use it
and check the local deviceId and if not a match, drop the message
since it is not for this device.

Changed naming to be more explicit.

Removed the FeatureLevel definition from the protocol since proto enums
won't be backwards compatible if updated. Instead, adding boolean flags
instead. For this release, the feature supported is multi-ring, so a
multiRing flag is defined instead of a feature level.

The supportsMultiRing value is persisted through to RingRTC. There is
no more need to translate between the enumerations anymore.

Added prefix naming for proto enums since the namespace is shared.

Removed defaults since they are already the desired default values.

When sending messages, using a nullable unsigned integer type instead
of a flag and value pair. This simplifies the function calls, although
some NSNumber extensions were required on the Swift side.
2020-05-08 15:50:49 -07:00
Jim Gustafson
60e619562e Update protocol buffer and behavior for multi-ring
Add type for Hangup messages, to reflect either normal hangup or hangup
because the call was accepted elsewhere.

Add type to Offer messages, which is used to indicate the type of call
that is being originated, either an audio call (the same as all legacy
calls) or a video call.

Add level for all messages, which is used to filter feature support,
either legacy or multi-ring behavior.

If the feature level for the Call Message is detected as legacy, AND if
the device is NOT the primary, drop the incoming Call Message.

Always mark outgoing Call Messages as multi-ring capable.

Adjust RingRTC interfaces to support:
- Call Media Type (default is always audioCall for now)
- The Hangup Type, which can be either normal (i.e. regular hangup) or
  accepted, replacing the removed Accepted message.

Hangups can now be sent out as a legacy messages or new messages. The
format is the same so that legacy clients will ignore 'new' hangups
sent to squelch ringing if they were actually the 'winner'.

Passing information for receivedOffer and receivedAnswer APIs to
indicate if the sender is a legacy sender or not. Legacy here means
someone using the protocol before the FeatureLevel was added to the
prototol for Call Messages.

Passing information to receivedOffer to indicate if the local device
is primary or not. As a result, if the device is receiving the offer
from a legacy device and is non-primary, the offer shall be ignored.
In this case, a new event is fired:

endedIgnoreCallsFromNonMultiringCallers

Co-authored-by: Michael Kirk <michael@signal.org>
2020-05-08 15:50:49 -07:00
Peter Thatcher
91dd820b3f Pass remote device ID to RingRTC 2020-05-08 15:50:49 -07:00
Matthew Chen
e84168fa68 Merge remote-tracking branch 'private/release/3.8.2' 2020-05-05 13:38:30 -03:00
Matthew Chen
8755b371c1 Try to reduce 0x8badf00d crashes by performing "app did become ready" block one-by-one.; Reduce overall frequency of checkpoints. 2020-05-04 22:02:23 -03:00
Nora Trapp
f0d7a9cb9c Add early message handling for delivery receipts, reactions, and delete for everyone 2020-04-16 19:44:45 -07:00
Matthew Chen
aa53773e84 Merge branch 'release/3.8.0' 2020-04-15 17:41:19 -03:00
Matthew Chen
a0eb61535a Bulk UUID lookup. 2020-04-15 17:11:29 -03:00
Matthew Chen
c38929dae5 Avoid rate limits while doing profile fetches. 2020-04-15 17:03:33 -03:00
Matthew Chen
a4d802a2a2 Avoid rate limits while doing profile fetches. 2020-04-15 17:03:33 -03:00
Matthew Chen
7246c613d5 Fix more build warnings. 2020-04-10 13:17:08 -03:00
Matthew Chen
988b11cf2a Remove YDB from views. 2020-04-07 13:51:02 -03:00