Commit Graph

133 Commits (c5b657e3f3b757b34787121f2ad8fb70280a4d62)

Author SHA1 Message Date
lilia 8939c61c7c Log on notification removal
// FREEBIE
9 years ago
lilia 7caecc564d Process all incoming conflicts before outgoing ones
Fixes a session management problem where, after resolving a conflict
with some contact, that contact would get bad mac as a result of us
sending them a new prekey message before processing a pending conflicted
prekey message received from them earlier.

Fixes #806

// FREEBIE
9 years ago
lilia 148bd32671 Update libsignal-protocol v0.10.0
* Changes policy for old session deletion
* Renames putIdentityKey to saveIdentity
* Remove device messages

// FREEBIE
9 years ago
lilia 1d60dc38fb Rename axolotl storage
// FREEBIE
9 years ago
lilia d1e9534542 Refactor delivery receipt tracking
Move code for matching receipts to messages (and vice versa) to its own
file.

// FREEBIE
9 years ago
lilia 18012688ea Log unread message timestamps
// FREEBIE
9 years ago
lilia 07a0463b65 Fix conversation list self-resorting
When deleting all messages in a conversation, the entry in the left pane
should be inserted into the alphabetical portion of the list. To keep it
in this collection, do not nullify active_at.

To ensure the list view is keeping itself correctly sorted, make sure
that resorting behavior is triggered any time a relevant attribute is
changed.

This fixes deleted conversations jumping to the top of the list, and
conversation order scrambling when getting a group or contact sync
message from our master device.

Fixes #734

// FREEBIE
9 years ago
lilia 234f937bc7 Conversation subscreens share a header
// FREEBIE
9 years ago
lilia c8aa2246dc Let groups have blue headers
// FREEBIE
9 years ago
lilia 18a5ce8e54 Restyle conversation panel
// FREEBIE
9 years ago
lilia 8b3596b956 Delete last timestamp on a convo when deleting messages
// FREEBIE
9 years ago
lilia 6f3f33657a Don't mark read on sync messages
There's no longer a need for this since we have read-state syncing.

// FREEBIE
9 years ago
lilia 762cb68721 Serialize sending and adding messages to a convo
Previously, if a message was sent in between the receive time of an
incoming message and the time it is actually added to the conversation's
message collection (which only occurs later after several async
callbacks), the incoming message would be inserted not-at-the-end of the
collection since it is ordered by receive time. This tricked the front
end into assuming the message was an older message instead of a new one.

Fixes #490

// FREEBIE
9 years ago
lilia 67900753d1 Log sending read receipts
// FREEBIE
9 years ago
lilia 0763cf14a3 Remove messages from notifications when read
Remove individual messages from Notifications when marked read.
Previously this was only done from the conversation model when marking
the entire conversation as read.

Fixes #717

// FREEBIE
9 years ago
lilia 2b7cbef8b1 Rename a function
Avoid confusing this operation with actual receipts, which are something
else.

// FREEBIE
9 years ago
lilia b77d5df4f2 Fix markRead when messages have not been loaded yet
Query the database and not just the in-memory messages.

// FREEBIE
9 years ago
lilia 01053335ac Don't send empty read status reports
// FREEBIE
9 years ago
lilia f88b33a135 Fix unread message lookup in markRead
// FREEBIE
9 years ago
lilia c4a88dd651 Fix getUnread query
Booleans are not valid keys in indexeddb.
https://www.w3.org/TR/IndexedDB/#dfn-valid-key

// FREEBIE
9 years ago
lilia 2e30c4388f Set destination on end session messages for syncing
// FREEBIE
9 years ago
lilia e91f646920 Fix initial post-sync timestamps
Fixes #669

// FREEBIE
9 years ago
lilia 1f897f32b7 Track and sync unread messages
// FREEBIE
9 years ago
lilia 7e8ce5eb54 Omit left groups from search
Unless they contain messages.

// FREEBIE
9 years ago
lilia 010297f4c5 Track groups I've left
// FREEBIE
9 years ago
lilia 173e037fa6 Fix minor style errors
And keep it that way, by making jscs config more opinionated.

// FREEBIE
9 years ago
lilia 137b992f87 Fix "Delete Messages" not deleting all messages
Since the introduction of infinite scroll, the delete messages function
has only deleted the currently loaded set of messages in a conversation.
To fix this, we should fetch all the messages and then delete them.

Fixes #645

// FREEBIE
9 years ago
Karel Bilek 557d33bf88 Fixing upper bounds on contact search (fixes #545) 9 years ago
lilia 1d6e391dd6 Prefer single quotes
// FREEBIE
9 years ago
lilia bc576e18d5 Fix no delivery receipts on close session messages
// FREEBIE
9 years ago
lilia 720032bb8e Remove id from search tokens
Instead, just strip the leading + from search queries that look like
numbers.

// FREEBIE
9 years ago
lilia a258f1a66b Refactor number parsing and validation
Refactor libphonenumber.validateNumber into libphonenumber.parseNumber,
which encapsulates the try-catch pattern used in number parsing and
returns an object of info about the input number rather tha throwing
since we expect to get some invalid number inputs the user is typing.

In the conversation model,
  * Separate phone number validation from search token updating.
  * Perform token update before save if the number was valid.
  * Stop storing unneeded number variants as conversation properties.

// FREEBIE
9 years ago
lilia 65c13adf5e Fix searching for numbers with parens or dashes
Strip some punctuation from search queries

// FREEBIE
9 years ago
lilia af64784d64 Let search match on full e164 format numbers
// FREEBIE
9 years ago
lilia 0b7742ecd7 Create contact by number with no country code or +
Search box finds or creates a conversation given a phone number in
local (to the user's region) or international format.

Previously you had to enter e164 format to set up the conversation
correctly.

If the number is not valid, do not open the conversation.

TODO: user feedback on invalid numbers.

// FREEBIE
9 years ago
lilia 0b95606eff Display nicely formatted phone numbers
In conversation headers and as titles for contacts with no name. Updated
tests accordingly.

// FREEBIE
9 years ago
Georg Semmler 1a6cedac56 Fix #402
Remove messages which are read from the notification
10 years ago
lilia 7bf94c33d5 Show all contacts when inbox is empty 10 years ago
lilia 07702c4ee5 Let the application layer send sync messages
Previously, libtextsecure would send a sync message automatically
when appropriate. This fails if any recipient has a key conflict
or if our network connection fails mid-send.

Instead, when appropriate, return a the DataMessage encoded as an array
buffer for later syncing. This lets the application choose when to send
it, which we now do after any successful send to a recipient, rather
than after all recipients are successfully sent to.

Eventually we should move the DataMessage protobuf construction and
group sending logic to the application layer entirely, in which case
we wouldn't need libtextsecure to construct the sync message either.

Fixes #408
10 years ago
lilia b59b702eb3 Clear the lastMessage when deleting a conversation
Leave no trace. Fixes #397.

// FREEBIE
10 years ago
lilia a569e34b33 Refactor new message notification and frontend updates
Create a cleaner seperation between generating notifications
and updating frontend conversation views. The former is now
handled by `conversation.notify` while the latter is achieved
by triggering an event on the conversation model, which will
only be acted on if there are any views listening for it.

Additionally, instead of re-fetching the entire message history,
which is overkill, just add or update the new/modified message.
This will help speed up the newmessage event handler and also
help avoid unnecessary re-rendering when resolving key conflicts.

// FREEBIE
10 years ago
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