Commit Graph

32 Commits

Author SHA1 Message Date
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
2016-08-22 16:09:58 -04:00
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
2016-08-18 13:40:48 -04:00
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
2016-08-02 11:50:59 -06:00
Michael Kirk
9aa88f6ce5 Merge pull request #21 from WhisperSystems/fix-delete-attachments
Fixup e61c81 by migrating old schema
2016-08-01 09:41:38 -07:00
Michael Kirk
baf564db2e Fixup e61c81 by migrating old schema
// FREEBIE
2016-08-01 09:09:12 -07:00
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
2016-07-31 09:02:07 -07:00
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
2016-07-31 08:49:01 -07:00
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
2016-07-31 08:49:01 -07:00
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
2016-07-31 08:49:01 -07:00
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
2016-07-31 08:48:46 -07:00
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
2016-07-29 11:37:35 -07:00
Michael Kirk
36cab4691c Accepting keychange only resends to single recipient (#18)
// FREEBIE
2016-07-19 08:32:09 -07:00
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
2016-07-18 16:00:59 -07:00
Michael Kirk
f537b6f192 Fix (and test) description for corrupted attachments (#16)
// FREEBIE
2016-07-07 16:05:58 -07:00
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
2016-06-30 20:39:01 -07:00
Michael Kirk
80671b247f Extract phone formatting method (#14)
* refactor and backfill tests for phone number parsing
* bump version to 0.0.5
2016-06-28 10:22:36 -07:00
Michael Kirk
f5aac9610c Fix compiler warning (#13)
* Fix compiler warning by removing lingering code.
* fix comment

// FREEBIE
2016-06-27 21:13:45 -07:00
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
2016-06-27 19:48:37 -07:00
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
2016-06-14 12:19:19 -07:00
Michael Kirk
ba0de5739d update to cocoapods 1.0.1 (#10)
//FREEBIE
2016-06-13 19:09:37 -07:00
Michael Kirk
32a7d49fac Fix avatar for single contact thread (#9)
// FREEBIE
2016-05-26 14:54:23 -05:00
Michael Kirk
d25045e6b9 contributing.md referencing Signal-iOS coding guidelines. Inlined legal. (#8)
//FREEBIE
2016-05-18 11:32:10 -07:00
Michael Kirk
3024225655 Get tests + ci running 2016-04-23 20:08:51 -07:00
Michael Kirk
a0c147722e Delete last message updates thread preview (signal ios#833) (#3)
* fix thread preview when deleting last message

because we are doing internal accounting of what our "last" message id
is, when we delete the last message, other things get out of whack.
Caching is hard, don't do it! We can efficiently get the last object
using our existing Yap DB view.

//FREEBIE

* remove lastMessageId in favor of lastMessage for cleaner code

//FREEBIE
2016-04-08 18:59:05 +02:00
Frederic Jacobs
a49d36d66a Renaming to SignalServiceKit.
TODOS: Rename Symbols and Xcode files.
2016-04-08 18:57:31 +02:00
Frederic Jacobs
30fff8e42f Upgrading for latest YapDatabase API. 2016-03-27 22:27:31 +02:00
Frederic Jacobs
b5a8cf0f0d Merge pull request #1 from kunickiaj/yapfix
Fix YapDatabase API change from string based filePath to NSURL
2016-01-23 20:52:10 +01:00
Adam Kunicki
94ef0e30f5 Fix YapDatabase API change from string based filePath to NSURL 2016-01-23 11:29:20 -08:00
Frederic Jacobs
f6f6133498 Adding completion blocks to media message sends. 2015-12-26 17:10:21 +01:00
Frederic Jacobs
8d6ce0b57c Notifications Protocol cleanup. 2015-12-22 22:43:08 +01:00
Frederic Jacobs
5d91a5bd4f Init Commit 2015-12-22 15:51:11 +01:00
Frederic Jacobs
27e63c37fc Initial commit 2015-12-04 13:22:18 +01:00