Commit Graph

64 Commits (a0df56a68e5db7729a209b069bcdfd56e6d7e92a)
 

Author SHA1 Message Date
Michael Kirk a0df56a68e Fix multiple keychange errors (#29)
* Don't attempt to send a message unless we've successfully built a deveice-messages
* Only process message exception when we're done with retries.

// FREEBIE
9 years ago
Michael Kirk 9821e0c0d0 Merge pull request #28 from WhisperSystems/desktop-integration
Desktop integration fixups
9 years ago
Michael Kirk 27dfb59a0c Emit notification when message is read.
We observe this in Signal to remove notifications for messages that were
read remotely.

// FREEBIE
9 years ago
Michael Kirk 800e2a9541 Log exception rather than crash upon failed deserialization
while populating secondary indexes

// FREEBIE
9 years ago
Michael Kirk 65e6778033 log network manager requests
// FREEBIE
9 years ago
Michael Kirk af155bf9ed Avoid deadlock when receiving read receipt before incoming message
// FREEBIE
9 years ago
Michael Kirk eb96f846a4 Send user agent to desktop so they can pick a theme for us
// FREEBIE
9 years ago
Michael Kirk d802918603 Merge pull request #26 from WhisperSystems/read-voice-messages
Read voice messages
9 years ago
Michael Kirk 3e5af16dc3 Don't explode when attachment support revoked.
Also, more nullability annotations.

NSURL can't be given a nil filepath. This can occur when a previously
supported attachment was downloaded, and then viewed after that
attachment was no longer supported (e.g. when installing back and forth
across versions)

// FREEBIE
9 years ago
Michael Kirk 1df99c5812 fix voice messages for iOS
// FREEBIE
9 years ago
Michael Kirk 7d70f6e770 Merge pull request #25 from WhisperSystems/dt
Multi Device (Desktop) Integration

// FREEBIE
9 years ago
Michael Kirk 0933b92128 Fix race condition with read receipts before incoming message
// FREEBIE
9 years ago
Michael Kirk 2de6927453 Remove sync data files after sync
// FREEBIE
9 years ago
Michael Kirk c8a5f50763 Fixup DevicesManager
* By providing a view extension for secondary devices we can use that in
  a view mapping to power our devices view controller, and avoid any race
  conditions with uncommitted transactions.

* Fix crash when you're not in your own contacts

* New device appears on top

* Don't show "edit" button unless there are devices, or rather, the helpers to do so.

* Fix glitchy refresh

  Saving unchanged records was causing the tableview to redraw, which was
  mostly invisible, except that if the refresh indicator were running, it
  would twitch.

// FREEBIE
9 years ago
Michael Kirk c39e8b0bc6 extract constant for image/png
// FREEBIE
9 years ago
Michael Kirk acb89f0b0f Outgoing Read Receipts
// FREEBIE
9 years ago
Michael Kirk 580781e3e4 Incoming Read Receipts
// FREEBIE
9 years ago
Michael Kirk a99fde4d3b Device manager
// FREEBIE
9 years ago
Michael Kirk d48fd158b7 Build contact/group exports with data streams
Ideally we'd be using file streams so we wouldn't have to load it all
into ram but none of the attachment uploading infrastructure takes
streams (yet!)

// FREEBIE
9 years ago
Michael Kirk fb9f0f9a4d Some nullability annotations
- prefer empty list (null object pattern!) for attachments vs nil
- stop passing nil args to init

// FREEBIE
9 years ago
Michael Kirk 8526f018e5 fixup group sync 9 years ago
Michael Kirk 69da0b3c25 Sync Groups with Desktop
// FREEBIE
9 years ago
Michael Kirk 36d3691c74 gather up device syncing classes
// FREEBIE
9 years ago
Michael Kirk 98d1c59bfc Sync Contacts with Desktop
* TODO refactor attachment sending to work without thread/message
* TODO de-dupe attachment pointer building code

// FREEBIE
9 years ago
Michael Kirk fe7171dd93 Sync messages with your other devices
After provisioning a desktop client, you'll see messages sent from your
phone appear on your desktop client, and messages sent from the desktop
client appear on your phone.

* In the process extracted some of the Attachment processing logic out
  of the giant MessagesManager.
* Some nullability annotations on affected files.

// FREEBIE
9 years ago
Michael Kirk 9093be2b0d Device provisioning
// FREEBIE
9 years ago
Michael Kirk 6ec21ade9b TSContactThread doesn't need to know protobufs
Just pass in the relay since that's the only thing we care about

// FREEBIE
9 years ago
Michael Kirk f4d90688b9 Replace compiler warning with logging message
// 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 c1a0b88232 Don't crash when contact lookup is given nil contact
// FREEBIE
9 years ago
Michael Kirk 5ae2717872 Simplify deviceMessages method
no need for a callback as it's a sync method.

// FREEBIE
9 years ago
Michael Kirk 9fe0ca000a bump version
// 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 f3a91c2629 Avoid collision with iOS10 SSKeychain framework (#24)
Our pod SSKeychain was renamed to -> SAMKeychain to avoid collision with
the iOS10 library SSKeychain.

* log failure to write keychain (this seems to only happen on simulator)
* ensure we exit if we fail to set DB cipher key

// FREEBIE
9 years ago
ArkadiuszBanas 01ab8d132d Handle animated content type in TSAttachment:description: (#19)
Displaying icons for gifs was missing in messages list cells
(https://github.com/WhisperSystems/Signal-iOS/issues/1271).

//FREEBE
9 years ago
Michael Kirk 9aa88f6ce5 Merge pull request #21 from WhisperSystems/fix-delete-attachments
Fixup e61c81 by migrating old schema
9 years ago
Michael Kirk baf564db2e Fixup e61c81 by migrating old schema
// FREEBIE
9 years ago
Michael Kirk c14e4bb7b3 Merge pull request #20 from WhisperSystems/fix-delete-attachments
Fix: deleting thread sometimes fails to recover disk space, new thread reappears with old messages.

// FREEBIE
9 years ago
Michael Kirk 28281ccfdd Delete lingering group avatar attachments
The images for group avatars are stored directly in the datbase, which
is fine since they are small. But then there's no reason to have them
lingering on the filesystem.

Also removed the unused group associatedAttachmentId property.

// FREEBIE
9 years ago
Michael Kirk e61c818738 Clarify message.attachments -> attachmentIds
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
9 years ago
Michael Kirk 0f9a3334c1 Ensure interactions removed when thread is deleted
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
9 years ago
Michael Kirk 2858694ee0 style changes // fix compiler warnings
- 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
9 years ago
Michael Kirk 5458a73cee Fix travis build
- specify destination, seeing it install app on different device than it
  was running the tests
- xcpretty for legible output

// FREEBIE
9 years ago
Michael Kirk 36cab4691c Accepting keychange only resends to single recipient (#18)
// FREEBIE
9 years ago
Michael Kirk d66c8bd427 Avoid deadlock while accepting new key (#17)
Using description in log output crashes when the description is a media
message, since printing media description uses a transaction within our
existing transaction.

Instead we'll use a simpler debugDescription for simple text building,
like logging.

// FREEBIE
9 years ago
Michael Kirk f537b6f192 Fix (and test) description for corrupted attachments (#16)
// 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 80671b247f Extract phone formatting method (#14)
* refactor and backfill tests for phone number parsing
* bump version to 0.0.5
9 years ago
Michael Kirk f5aac9610c Fix compiler warning (#13)
* Fix compiler warning by removing lingering code.
* fix comment

// 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