Commit Graph

27 Commits (7493e037c99f5d5005dd76de26df0e5c36fe93f1)

Author SHA1 Message Date
Niels Andriesse 7493e037c9 Fix minor code style issues 6 years ago
Mikunj Varsani c43295eb7c
Loki session reset (#14)
* Added session reset.

* Hooked up session reset internals to UI.

* Send empty message when we have received an end session message.

* Verify incoming PreKeyWhisperMessage.

* Fix indentations in SessionReset.md
6 years ago
Matthew Chen 39c820b866 Distinguish 'app will/did become ready' events. 7 years ago
Michael Kirk 0c2bb439f9 kick-queue upon reachability 7 years ago
Michael Kirk b8e4bfff86 shuffle isReady->isSetup, centralize starting workStep 7 years ago
Michael Kirk 037bdebfab clarify backoff delay examples 7 years ago
Michael Kirk 86a0efedc6 Don't delete session upon starting retry 7 years ago
Michael Kirk 3560f3be5c Durable send operation
TODO
-[x] respect order of queue
-[x] replacements
  -[x] those w/o completion handler
  -[x] basic send+log operation persists
  -[x] send+ui completion
  -[x] share extension
  -[x] update state jobs
-[x] App Lifecyle
  -[x] settable
  -[x] Mark as ready on startup
  -[x] Fail appropriate jobs on startup

NICE TO HAVE
-[x] concurrent per senders
-[ ] longer retry (e.g. 24hrs)
-[ ] App Lifecyle
  -[x] retry failed jobs on startup?
  -[ ] reachability

DONE
-[x] basic passing test
-[x] datamodel
-[x] queue/classes
7 years ago
Matthew Chen ebae75af00 Revert 'new sort id'. 7 years ago
Michael Kirk df61316495 minimize diff senderTimestamp -> timestamp 7 years ago
Michael Kirk eef1368ad3 Timestamp audit step1: change signature
There is no change in functionality in this commit.

Apart from clarifying what the timestamp means (it's the timestamp of the
*sender*), this intentionally breaks all the call sites, so I could have a sane
way to thoroughly audit wherever we're passing in timestamps, to see where
we're depending on them to affect sort order.

For the sake of a cleaner diff of meaningful changes, instead of "fixing"
everything in this commit, I've just added comments and renamed signatures.
7 years ago
Matthew Chen cf6f3841a8 Apply new Swift logging. 7 years ago
Matthew Chen 26001e49d1 Unify log tags. 7 years ago
Matthew Chen 4d8c764789 Migrate to Swift 4. 7 years ago
Matthew Chen b2b62880c0 Migrate to Swift 4. 7 years ago
Matthew Chen d6f4db1523 Rename TSStorageManager to OWSPrimaryStorage. 7 years ago
Matthew Chen 6b357f9445 Respond to CR. 7 years ago
Matthew Chen d3e16583eb Add protocol context to protocol kit. 7 years ago
Michael Kirk a11d83187b WIP: Framework-friendly - compiles but crashes on launch
// FREEBIE
8 years ago
Michael Kirk 43092ee6ac CR: be extra paranoid about archiving the reset session
// FREEBIE
8 years ago
Michael Kirk 47926418b5 Prevent subsequent "No valid session" errors from the recipient of an
EndSession message.

// FREEBIE
8 years ago
Matthew Chen c6160a5a1e Rework the "update with..." methods to avoid re-saving deleted models. 8 years ago
Michael Kirk 6ba5e5cc6b Clean up session-reset logging
// FREEBIE
8 years ago
Michael Kirk d8ae941736 Delete session *before* sending EndSession message
Typically we're sending an EndSession message because our session has
diverged from the remote party's session. So if we send an EndSession
message, but decrypt it with our old out-of-sync session, how can we
expect them to be able to decrypt it?

Instead, by deleting the existing sessions, we'll fetch a new PreKey,
and start fresh with the remote side.

// FREEBIE
8 years ago
Michael Kirk 033591aeca Remove unused code
// FREEBIE
8 years ago
Michael Kirk 28a2a4610c Fix compiler warnings.
// 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