Commit Graph

38 Commits (11b822eaf381e1b841d2c73a01718c8cf43948d8)

Author SHA1 Message Date
lilia 11b822eaf3 Allow unknown groups
Save groups even if we've never heard of them. Previously
we would fail to save due to a missing 'type' attribute.
10 years ago
lilia 897d391817 Improve identity key conflict ux
Clicking on a key conflict message opens the message detail view,
which displays the contact(s) in this conversation. If the message
contains a key conflict with any of these contacts, a button is
displayed which attempts to resolve that conflict and any other
conflicts in the conversation that are related to that contact.
10 years ago
lilia 857eee5003 Divorce identity wipe from tryAgain functions
We'd like to live in a world where we can retry all the pending
conflicts in a conversation as a batch, which means we don't want to
wipe the identity key before processing each message. Thus, remove that
step from these handlers and encapsulate in a method on the conversation
model.
10 years ago
lilia c642854ddf Extract app-level logic from libtextsecure
Ensure that both tryAgain functions return promises, allowing the
application to take appropriate action in the result of success or
failure. This lets us remove all dependency from libtextsecure on
app-level constructs like message objects/ids and the `extenion.trigger`
function.

Corresponding frontend changes to follow in another commit.
10 years ago
lilia cecb438a52 Simplify avatar rendering 10 years ago
lilia fa3699cdd3 Trigger desktop notifications
Notifications show the conversation name, avatar, and new message text.
Clicking the notification opens the conversation.
10 years ago
lilia 8e54aa1401 Plumb contact avatars into conversations 10 years ago
lilia 019a9d1fbc Unread counts
Update unreadCounts per-conversation on incoming messages. Render unread
conversations with font-weigh: bold in the inbox view.

To ensure that the inbox and conversation views remain in sync, the
background page now ensures that the same models objects are used for
both views.
10 years ago
lilia 2ee34343a8 Use consistent boiler plate throughout js files 10 years ago
lilia c08c29bd4a Render group members in the message detail view
This requires that we fetch contact info when opening a conversation
so that's available for rendering contact names and avatars.
10 years ago
lilia ec43a0b633 jshint all the things
Small style fixes here and there. Removed one unused file.
10 years ago
lilia 488f25635d Wire up end session and leave group
Closes #136
Closes #137
10 years ago
lilia 44b1e5c88e Move inbox collection to the background page
No more waiting, no more messy fetch logic. Background page
bootstraps the inbox and keeps it up to date.
10 years ago
lilia b27826cba5 Conversations must have an id before saving 10 years ago
lilia c84ccfc735 Wrap model phonenumber validation in try/catch 10 years ago
lilia eae072e72d Remove unneeded var, add todo 10 years ago
lilia fc3a600e72 Validate conversation type 10 years ago
lilia 5e3ed1658b Show phone numbers in contact selector 10 years ago
lilia d435ff003b Improve typeahead contact selector experience
Store and match on various phone number formats. Still not perfect, as
occasionally all the models are returned for a non-matching query.
10 years ago
lilia e05405e832 Format phone numbers before saving conversations
Saving the national and internation versions of the number lets us use
those attributes in a typeahead collection.
10 years ago
lilia bd86546cea Make chat window titles match contact list 10 years ago
lilia d119bdff01 restore default avatars 10 years ago
lilia 3d6c251fd1 Group avatars 10 years ago
lilia 0ea176dfa0 Don't require a conversation name
Just display a sensible default in the frontend if it's unset.
For private conversations this should be the phone number, for
groups, the list of numbers.
10 years ago
Dave Sescleifer 2462aba24b Fixed timestamps and added last message to the gutter 10 years ago
lilia 8ed73d0ce5 Normalize send-path error handling
Receive and handle an array of errors in both the group and individual
cases.
10 years ago
lilia ccc98d2f3d Fixup delivery receipts
Uses app-level timestamps for outgoing messages.
Adds timestamp property to the outgoing jsonData.
Triggers a runtime event to notify frontend on delivery receipts.
Renders delivered messages with a 'delivered' class.
10 years ago
lilia 348b5a53b1 Fixup OutgoingIdentityKeyError handling 10 years ago
lilia cfd4ccc803 Move index querying logic to /models 10 years ago
lilia 6cbde7894a Delivery receipts 10 years ago
lilia 006653ed8e DB/Index Redux
This change removes the timestamp field from messages and conversations
in favor of multiple semantically named timestamp fields: sent_at,
received_at on messages; active_at on conversations. This requires/lets
us rethink and improve our indexing scheme thusly:

The inbox index on conversations will order entries by the
conversation.active_at property, which should only appear on
conversations destined for the inbox.

The receipt index will use the message.sent_at property, for effecient
lookup of outgoing messages by timestamp, for use in processing delivery
receipts.

The group index on conversation.members is multi-entry, meaning that
looking up any phone number in this index will efficiently yield all
groups the number belongs to.

The conversation index lets us scan messages in a single conversation,
in the order they were received (or the reverse order). It is a compound
index on [conversationId, received_at].
10 years ago
lilia 8c93101989 Don't store conversationType on messages
This was used to conditionally render messages in the group style, but
it's actually unnecessary. We can render the same markup in both cases
and change the appearance with css.
10 years ago
lilia 8257fa7478 Add support for deleting a conversation
Note that the conversation record is not actually destroyed,
merely marked inactive, preserving the contact name, photo,
etc...
11 years ago
lilia 99a2685f93 Store attachments as binary blobs
Move base64 encoding of attachments to an AttachmentView. This makes
image rendering an asynchronous task so we fire an update event to
indicate to the parent MessageListView that its content has changed
height and it is time to scroll down.
11 years ago
lilia fd3a72d435 Destroy all globals
Well, not *all* globals..
11 years ago
lilia c0681beca7 Consolidate message callbacks
Register the runtime callback at the top level view rather than having
each conversation view register independently.
Also refactors Layout into InboxView.
11 years ago
lilia 470346c9c4 Save incoming messages and pass to frontend asynchronously
After a message is saved asynchronsly, fire an event and pass the
message attributes to frontend listeners via the chrome-runtime API.

This behavior is similar to the 'storage' event fired by localStorage.
11 years ago
lilia ced295a630 Move message and conversation storage to IndexedDB
Getting up and running with IndexedDB was pretty easy, thanks to
backbone. The tricky part was making reads and writes asynchronous.
In that process I did some refactoring on Whisper.Threads, which
has been renamed Conversations for consistency with the view names.

This change also adds the unlimitedStorage permission.
11 years ago