Commit Graph

2652 Commits (4f90cefd4f5f9f7282198ba26acadbbfa8da79f7)
 

Author SHA1 Message Date
Scott Nonnenberg 4f90cefd4f More bullet-proofing - reject surrounding promise if save() fails
FREEBIE
8 years ago
Scott Nonnenberg 1eb450ca35 Conversation: Start w/DEFAULT verified state, avoid null timestamp
Fix too-aggressive verification notifications on startup by starting a
conversation with the right initial verified state, and then making sure
to fetch() before setting a new verified state.

FREEBIE
8 years ago
Scott Nonnenberg bd0050b6c6 Cache messages on receipt, remove from cache when processed
FREEBIE
8 years ago
Scott Nonnenberg e6859a3684 Ensure that promises always resolve, or that rejections are okay 8 years ago
Scott Nonnenberg 4da1722ee8 Bullet-proof _setVerified and handleDataMessage against rejections
And the weird behavior we get from $.Deferred.

FREEBIE
8 years ago
Scott Nonnenberg 5da324103a Throttle calls to getProfile when opening conversation
We don't want to throttle other calls to getProfile, so we localize this
to the fetch we do when we first open a conversation.

FREEBIE
8 years ago
Scott Nonnenberg aa80cdd74d ConfirmationDialogView: Make showCancel an explicit option
Also, don't call resolve/reject callbacks if they weren't provided.

FREEBIE
8 years ago
Scott Nonnenberg 14765599f3 Delete individual message
FREEBIE
8 years ago
Scott Nonnenberg 782b8c7640 someRecipientsFailed string: Add period for consistency
... with messageNotSent.

FREEBIE
8 years ago
Scott Nonnenberg 80a2a01e37 Remove jitter on verifying/unverifying safety number
On every click, even when sub-panes were open, we were calling
markRead(), which would save the conversation model with the new
unreadCount. The KeyVerificationPanelView was wired up to the change
event on conversation, so it would render with the results of that
update, then finally the user's intended update.

FREEBIE
8 years ago
Scott Nonnenberg 12b2674bde Show size of files even if size not precomputed for attachment
FREEBIE
8 years ago
Scott Nonnenberg 9ba5aaa54d Verification sync logging: include whether it was from contact sync
FREEBIE
8 years ago
Scott Nonnenberg 4124d5cb9b Show 'Message not sent' only if 'Some recipients failed' not showing
Also switch up the visual style for 'Some recipients failed' text to
match the more-visible 'Message not sent' text and the 'Resend' link.

FREEBIE
8 years ago
Scott Nonnenberg 25243ad9de Send warning: Show single problematic group member, not group name
FREEBIE
8 years ago
Scott Nonnenberg 08ecb5f3d2 Improve wording on the 'SN changed' popup after verification
FREEBIE
8 years ago
Scott Nonnenberg 697079cf9b Add else handlers with logging in toggleVerified catch handler
FREEBIE
8 years ago
Scott Nonnenberg 8112cd220a Show warning when we discover key change on verify
FREEBIE
8 years ago
Scott Nonnenberg 91f50c028f Unify processVerifiedMessage with Java implementation
This removes our support for the New Key/DEFAULT case, which iOS will
sync to us. Why? Because it ensures that in out of date scenarios, we
don't lose the higher-security state we were in previously.

FREEBIE
8 years ago
Scott Nonnenberg 5bba6d3f17 setTrusted() -> setApproved() to dismiss the five-second warning
This change makes sense, since there was already a reference in the code
to the then-nonexistent setApproved()!

FREEBIE
8 years ago
Scott Nonnenberg 86b1aafe0c "Clear verification" -> "Mark as not verified"
We lose consistency with iOS, but it is more consisent with the other
phrasing used throughout the app.

FREEBIE
8 years ago
Scott Nonnenberg d1a9b62077 test/index.html: Restore previous location of code coverage stuff
I changed the location when trying to get code coverage to work properly
and it turned out not to be necessary for the fix.

FREEBIE
8 years ago
Scott Nonnenberg 23a806a6b1 removeAllSessions: properly reject in failure cases
FREEBIE
8 years ago
Scott Nonnenberg 7ab20f09cc Fix focus issues with identity key send view
Tabbing right after entering the view would cause everythign to go crazy
as focus went back to the pane you were just on. This change both sets
the proper focus on load of that view (on the cancel button) and hides
other panes when they aren't active, only making them visible again when
they are once again the 'top' pane.

FREEBIE
8 years ago
Scott Nonnenberg ff4fde651c Make it clear in conversation just some recipients failed
FREEBIE
8 years ago
Scott Nonnenberg c10e1b4ad0 Code coverage test run: Fix broken test
This test failed only under code coverage runs - because start up of the
page too took long!

FREEBIE
8 years ago
Scott Nonnenberg 5c990d2a35 Code coverage: Collect test coverage for the protocol layer
Because we were only doing a partial instrumentation run prior to this
change, un-instrumented code had references to un-instrumented code
(because Blanket's instrumentation re-runs the code once it is
instrumented, updating the window.NAME reference).

A big part of this was that libtextsecure was not instrumented. And for
good reason; it takes a long time to load and run, especially when
instrumented. But without covering it, we'll have an incomplete view
of our code coverage. So, all coverage collection remains off by
default.

FREEBIE
8 years ago
Scott Nonnenberg 10f4f3fea5 Fix crash in keychange listener test
FREEBIE
8 years ago
Scott Nonnenberg 12914307f1 Improve experience when discovering identity key error on send
New experience in the Message Detail view when outgoing identity key
errors happen, matching the Android View.

'View' button is only shown on outgoing key errors right now.

When a contact with an outgoing identity key error is clicked, they are
taken to a view like the popup that comes up on Android: an explanation
of what happened and three options: 'Show Safety Number', 'Send Anyway',
and 'Cancel'

Contacts are now sorted alphabetically, with the set of contacts with
errors coming before the rest.

FREEBIE
8 years ago
Scott Nonnenberg b6cca41a0c Update verification-related strings to better match mobile app
FREEBIE
8 years ago
Scott Nonnenberg f654532fa8 Handle UNVERIFIED sync verification messages (via contact sync)
FREEBIE
8 years ago
Scott Nonnenberg 20451cc827 Show verified/keychange notifications when actually relevant
FREEBIE
8 years ago
Scott Nonnenberg 3d445fe549 jshint: Introduce laxbreak to allow for if clauses on diff lines
(with the || or && operator at the beginning of the line)

FREEBIE
8 years ago
Scott Nonnenberg e91f2d0377 Miscellaneous wire-up to ensure that failures propagate
FREEBIE
8 years ago
Scott Nonnenberg 293be5d9f6 Truncate long filenames in attachments
The :before technique for adding the icon was removed, because it
resulted in some rendering issues when the layout pressure in the
message bubble got too high - you would see a partial icon. This
solution shrinks the icon a bit when the filename wants to expand to
take its space.

The iOS bubble width also needed special care to ensure it didn't expand
to accommodate the very wide filenames. Beyond that, overflow: hidden
needed to be applied at several levels to make everything behave as
expected.

FREEBIE
8 years ago
lilia 877f092b2c Fix tests
saveIdentity now requires a full protocol address string

// FREEBIE
8 years ago
lilia aa83bc1dab Ensure all sessions are archived on profile fetch
If the key has changed, saveIdentity will archive sibling sessions, but not the
session for the device it was called on. Therefore we have to archive that one
by hand.

Also switch from saving the identity of an OutgoingIdentityKeyError to just
triggering a profile fetch, mostly for consistency, simplicity, and DRYness.

// FREEBIE
8 years ago
lilia 3206536d47 Fix deadlock in saveIdentity
Archive only sibling sessions so as not to block on the same device lock as the
protocol lib.

// FREEBIE
8 years ago
lilia e5e4eab9c5 Add archiveSiblingSessions
// FREEBIE
8 years ago
lilia 982e7f962c Update libsignal-protocol
// FREEBIE
8 years ago
Scott Nonnenberg e2ee63efaa m.get('sender') -> m.isIncoming(), filter in getLoadedUnreadCount
FREEBIE
8 years ago
Scott Nonnenberg 5b46ef3562 Show last seen indicator for keychange/verification notifications
FREEBIE
8 years ago
Scott Nonnenberg 1fedc75e5d Handle unverified length of zero
This can happen with unknown groups, where we don't know the list of
members but we're receiving messages. It's generally not a good
experience, but we shouldn't crash.

FREEBIE
8 years ago
Scott Nonnenberg 224140c911 OutgoingMessage: Provide proper timestamp for replayability
FREEBIE
8 years ago
Scott Nonnenberg 5d1150e5bc Fix call to reloadDevicesAndSend - it returns a function
FREEBIE
8 years ago
Scott Nonnenberg f414c13220 Protos: Update to optional verified in sync (was: repeated)
This means that we no longer need to iterate.

FREEBIE
8 years ago
lilia fdce4cfc7c Fix failed identity key sync from contact sync
These were failing because ByteBuffers from the protobufs need to be converted
to ArrayBuffers. Fixed by useing the existing handler in MessageReceiver to
process verified messages from contact sync messages and dispatch them as their
own events, reducing some complexity on the application side.

// FREEBIE
8 years ago
Scott Nonnenberg 78094102bd Message.send: Add promise to array for consistency
FREEBIE
8 years ago
Scott Nonnenberg 4ee4ad80c3 Message.send - check for missing identityKey, also add logging
FREEBIE
8 years ago
Scott Nonnenberg 551aa24e9a OutgoingMessage: A few code style tweaks to make things readable
FREEBIE
8 years ago
Scott Nonnenberg 116e4d2eeb OutgoingMessage: Reduce the calls to registerError
In some cases, due to promise chaining and error propagation, we were
calling registerError more than once for a given error. This would then
cause the overall callback for the send operation to be called with a
partial set of errors, as well as duplicates.

Note: we do need to find a way to attach identityKey to the
OutgoingIdentityKeyError in the case where it comes directly from the
encrypt() instead of our pre-key operations.

FREEBIE
8 years ago