Commit Graph

92 Commits (055fc4f6859a3269d654b3f03a419c71112df984)

Author SHA1 Message Date
lilia 9c8933c3d0 Resolve conflicts one at a time
Previously, with a mix of text and media messages in conflict,
asynchronous callbacks aligned so as to fail to remove some of
the conflict objects on messages.

Fix by serializing conflict processing, but making sure to move
on through the message list even if some conflict resolutions fail.

Fixes #370

// FREEBIE
10 years ago
lilia c64fe8410e Convo list shows 'Media message' when appropriate
// FREEBIE
10 years ago
lilia ee393bfa03 Ensure that tokens get updated on initial save
// FREEBIE
10 years ago
lilia 82ce76265d Remove stray log statement
// FREEBIE
10 years ago
lilia f70c22f898 Add search field to inbox
Using the search field produces a filtered view of all contacts and
groups containing the input. To make this fast and scalable, add an
index on a 'tokens' array containing words from the conversation name
and different forms of phone number.

Closes #365

// FREEBIE
10 years ago
lilia 8453424ebd Fix stuck pending messages state
Refactor outgoing message error handling to use the same success and
error handlers. This creates a somewhat strange pattern, where we call
send and pass in the promise that resolves when sending is complete, but
there's enough variety in the libtextsecure syntax for different message
sending routines that it belongs at the conversation level and only the
post-processing stuff is really shared by all messages.

// FREEBIE
10 years ago
lilia 9ff95c7e61 DRY up group update sending
// FREEBIE
10 years ago
lilia f6b35ffbfc Log error stack traces
// FREEBIE
10 years ago
lilia 213dbdefd2 Reorder functions
// FREEBIE
10 years ago
lilia d1191c509c Log outgoing errors individually
// FREEBIE
10 years ago
lilia ada3d999e0 Log outgoing errors
// FREEBIE
10 years ago
lilia d8803ee31f Mark leave group messages as sent
// FREEBIE
10 years ago
lilia b617240338 Stop calling updateInbox all the time
Now that the inbox collection keeps itself in sync, we don't have the
data duplication that was forcing us to reload constantly.

// FREEBIE
10 years ago
lilia 4b0c70fb44 Resolve multiple conflicts independently
When resolving multiple conflicts in a conversation, failure to resolve
one should not block any others.

// FREEBIE
10 years ago
lilia 80764bf494 Remove unused function
// FREEBIE
10 years ago
lilia 1a30d003f5 Fetch group contacts before fetching new messages
Messages must wait for sender info to arrive before rendering.

// FREEBIE
10 years ago
lilia 0ebdf08ceb Render identicons in notifications
Render an svg, then canvas, then data url.

Fixes #325

// FREEBIE
10 years ago
lilia 3bd9108f6e Use isPrivate helper
// FREEBIE
10 years ago
lilia 0509bb0f5d Remove global updateInbox, used scoped version
// FREEBIE
10 years ago
lilia 2ab7315c80 Use generic collection for conversation contacts
Let the conversation controller instatiate the models in order to avoid
having duplicate models in memory.

// FREEBIE
10 years ago
lilia 6d4bf4e5d1 Whitespace
// FREEBIE
10 years ago
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
10 years ago
lilia baa55c9018 Refactor for less model duplication 10 years ago
lilia 3e73f8f0ba Resolve conflicts in series
Attempting to resolve outgoing conflicts in parallel triggers multiple
requests for new keys from the server and causes it to return a 500
error.
10 years ago
lilia ccfae3c78a Fix bug in identity key conflict edge case
When resolving conflicts, we should not only discard the old key, but
set the new trusted key to the one the user has verified. Previously, we
would end up trusting the first-seen new key, which may not be the one
the user verified.

 // FREEBIE
10 years ago
lilia d808d255eb Fix bug with 0th contact color
Contact color css class wasn't being rendered because 0 is falsey.

// FREEBIE
10 years ago
lilia 47b58b8994 Use the correct number of contact colors
Bugfix from 2f12275
10 years ago
lilia 2f12275cb9 Update contact colors
Make default contact color assignments consistent with
WhisperSystems/Textsecure@99d3a76b
10 years ago
lilia 17a3025af2 Mark end session messages sent 10 years ago
lilia 9dfff879b6 Remove usage of extension.trigger
This trigger function uses chrome's runtime message passing api, which
traverses between different windows in our runtime, but we only trigger
the updateInbox event from the backgroud page, so we don't need to use
that api, which requires some extra cpu/memory overhead.

// FREEBIE
10 years ago
lilia 853b578551 Change default value for active_at
We're overriding the default with null often enough that we should
just change the default.

Consequently, no more phantom blank conversations with oneself should
appear after receiving a group update. They were being added to the
inbox because they were incorrectly initialized with an active_at value.

Fixes #281
10 years ago
lilia fa4022a4e3 Invert pending/sent model 10 years ago
lilia a66195a98f Fix messages stuck in pending state
The unset function, and the series of events/callbacks triggered by its
use, are not as similar to the set/save functions as previously
anticipated, leading to flux in the state of the 'pending' attribute.

Fixes #283

// FREEBIE
10 years ago
lilia 3cbe4f1f46 remove unused argument 10 years ago
lilia 29360fea5c Fixes #275 default group image 10 years ago
lilia feb5e5b068 Display gray # instead of colored + for no-name contacts
For consistency with android.
10 years ago
lilia e26b9bfbc7 Default avatar support
Fixes #264

Implement the equivalent of java's String.hashCode on the conversation model.
Change avatar template and attributes. Use css classes for colors.
10 years ago
lilia 290283f810 Conversations do not require timestamps
Synced contacts will not include timestamps
10 years ago
lilia a833d62a71 Implement sync protocol changes
Update protobuf definitions and refactor message receive and decrypt
codepath to support new protocol, including various flavors of sync
messages (sent messages, contacts, and groups).

Also cleans up background.js and lets libtextsecure internalize
textsecure.processDecrypted and ensure that it is called before handing
DataMessages off to the application.

The Envelope structure now has a generic content field and a
legacyMessage field for backwards compatibility. We'll send outgoing
messages as legacy messages, and sync messages as "content" while
continuing to support both legacy and non-legacy messages on the receive
side until old clients have a chance to transition.
10 years ago
lilia 9795b26bc1 Supress change event on avatarUrl initialization 10 years ago
lilia 363c436b33 Handle single-error rejections when sending messages
We can not assume that we will get back an error array.

Closes #258 // FREEBIE
10 years ago
lilia 6e1a41e9cf Update inbox when group avatars change 10 years ago
lilia a66c879426 Update inbox after destroying a conversation
Fixes #247

// FREEBIE
10 years ago
lilia 3e39271220 Render messages light blue until finished sending // Fixes #219 10 years ago
lilia 405e67c758 Merge inbox and panel controllers
These collections should always be operating with the same model
instances, so let the inbox reset it self from the same in-memory
cache of conversation models used by the conversation windows.
10 years ago
lilia 08878b3dc8 Update inbox after sending a message
Also change the event name to reflect how its being used, and stop
passing the message object around since it is not being used.

// FREEBIE
10 years ago
lilia 20ebc3f890 Move identity key storage functions to axolotl store 10 years ago
lilia 71715c95bc Async remove identity 10 years ago
lilia 90c742d57c More error logging 10 years ago
lilia c51773ab0e More helpful error logging 10 years ago