Started extracting a MessageSender class from TSMessagesManager+send for
easier testability and in hopes of further slimming down that son of a
gun.
// FREEBIE
In coordination with Desktop and Android, iOS will be using all-numeric
fingerprints, aka "Safety Numbers".
Furthermore, the concept of verifying one identity and then the other
has been removed. Instead we ask users to exchange a single number, or
scan a single QR code. These credentials are built by combining the
users identities.
// FREEBIE
Initially we don't have device messages for our remote device. We need to send the empty device list to get the updated list of remote devices.
Introduced lots of dependency injection to make MessagesManager more testable.
// FREEBIE
What we *previously* refered to as attachments are actually just the
attachment's id (NSString). This has tripped me up a few too many
times.
Also, use generics with attachment id's array.
// FREEBIE
In theory, this should have already been handled by the
YapDatabaseRelationship extension via edges.
However, in practice, there were situations (cause unknown) where
interactions would exist without an edge to their corresponding thread.
Rather than being clever with the edge/callback machinery, now threads
explicitly delete all their interactions, and interactions delete all
their attachments (when applicable).
Also, a class to clean up spurious interactions / attachments
In the process:
- refactored TSYapDatabaseObject init to specify designated initializer
- added some testing niceties to TSYapDatabaseObject
// FREEBIE
- log errors
- forward declare where possible
- clang-format
- remove inaccurate file headers
- include Pods in Example app build target to get SignalServiceKit warnings
- Fix those warnings!
// FREEBIE