Commit graph

734 commits

Author SHA1 Message Date
lilia
66ae3689c1 Fix decrypt error handling
This rejection-handler was resolving its promise rather than allowing
the rejection to bubble up.
2015-07-06 12:46:32 -07:00
lilia
f8ae5556d9 Fix standalone registration 2015-07-06 12:45:09 -07:00
lilia
6a98fc8278 Reload contacts when resetting a recipients input
Fixes #272

// FREEBIE
2015-07-06 12:13:49 -07:00
lilia
f5f4c128f9 Fix tests, let templating handle html escaping
Note: as a Chrome app, we're also protected from xss by the content
security policy.

// FREEBIE
2015-07-04 23:08:25 -07:00
adambar
fcc873ffca Trim the message before sending - disable sending whitespace characters only 2015-07-03 21:53:45 +02:00
adambar
c20c59add0 Include Ctrl+Enter as one the shortcuts that insert line break instead of submitting the message 2015-07-03 13:49:01 +02:00
adambar
86f7b7adf5 Allow line breaks in messages. Closes issue #291
Line breaks can now be insterted into message box using Shift+Enter or Alt+Enter. Messages with new lines are properly displayed in the conversation view (but only there, to keep inbox clean). The template was modified to allow HTML, but the message itself is sanitized before new line handling is run.
2015-07-02 23:02:27 +02:00
adambar
52857f09ea Fix for conversation & inbox windows closing callbacks never called.
As discussed in similar issue there: https://github.com/GoogleChrome/chromedeveditor/issues/1023 - it is not possible to add onClosed event listener on an 'abstract' current window property, it needs to be set on the particular window instance instead.

Before that change, the clean up function was never actually called, because the listener was never properly attached. That was probably the reason of existence for "panel isn't actually open ... and so we try again." code that was executed if the previous window wasn't cleaned up properly (so actually every time). This code is no longer needed, I guess, as the windows are now cleaned up properly.
2015-07-01 22:28:06 +02:00
lilia
5242108e15 Fix group update avatar handling
The avatar handler was being added to the list of promises too late,
so we were storing the raw avatar protobuf (Long id, bytes key) rather
than the downloaded/decrypted attachment data.

Fixes #280
2015-06-26 12:23:57 -07:00
lilia
5e6145aa46 Mark conversation read on window focus event
Fixes #282

// FREEBIE
2015-06-26 11:53:00 -07:00
lilia
29360fea5c Fixes #275 default group image 2015-06-26 11:30:54 -07:00
lilia
feb5e5b068 Display gray # instead of colored + for no-name contacts
For consistency with android.
2015-06-25 13:47:46 -07:00
lilia
4c40861728 Fix reinstalls
Delay saving of new account info until we confirm with the server.
Explicitly delete old account info beforehand.

// FREEBIE
2015-06-25 13:24:32 -07:00
lilia
db31835f68 Handle group sync for existing groups
// FREEBIE
2015-06-25 13:24:32 -07:00
lilia
5925c2fe84 Support for group sync
Protocol and handling is all analogous to contact sync: Multiple
GroupDetails structs are packed into a single attachment blob and parsed
on our end. We don't display the synced groups in the conversation list
until a new message is sent to one of them.

// FREEBIE
2015-06-25 13:24:32 -07:00
lilia
3dd8056487 Add error dialog for too many devices 2015-06-25 13:24:31 -07:00
lilia
f126e3b21b Work on auth error handling / reinstall 2015-06-25 13:24:31 -07:00
lilia
ef8a977f38 Sort contacts by name ignoring case 2015-06-25 13:24:31 -07:00
lilia
2f935dfd5e Add contact sync request protocol 2015-06-25 13:24:31 -07:00
lilia
f32ff58953 Add support for device name 2015-06-25 13:24:30 -07:00
lilia
7d568b5092 Fixup auto-expand
* Fix a css bug preventing bottom bar from sticking to the bottom.
* Resize discussion container as a function of the overall window
  height. The previous difference-based method gives the wrong result
  when the window height changes but the bottom-bar height stays the
  same.

// FREEBIE
2015-06-24 12:10:53 -07:00
adambar
b80706089c Fix for potential memory leaks 2015-06-23 22:46:27 +02:00
adambar
9c563cf080 Fix for message box auto-sizing behavior on resize; menu z-index fix 2015-06-23 22:46:27 +02:00
adambar
da1abd75bf Remove message textarea resize handle; fix resizing after submit 2015-06-23 22:46:06 +02:00
adambar
07ac0ae9cc 239 Auto-expand message area when typing 2015-06-23 22:45:41 +02:00
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.
2015-06-19 11:50:18 -07:00
lilia
8dc4e34aaf Bug and test fixes for contact sync
Closes #135

// FREEBIE
2015-06-18 13:48:32 -07:00
lilia
6a5f923cac Don't set attributes redundantly
By the time we get here, these should have already been set in
background.js.

// FREEBIE
2015-06-17 12:29:40 -07:00
lilia
b0603bc91a Wrap message receiver for minimum api exposure
Initializing a message receiver opens the socket and starts listening
right away rather than requiring a separate call to connect. The only
other publicly accessible method is to query the socket status.

// FREEBIE
2015-06-17 12:29:40 -07:00
lilia
18433419c9 PushMessageContent is now DataMessage 2015-06-17 12:29:40 -07:00
lilia
316838cfe9 Add tests and bug fixes for ContactBuffer 2015-06-17 12:29:40 -07:00
lilia
290283f810 Conversations do not require timestamps
Synced contacts will not include timestamps
2015-06-17 12:29:40 -07:00
lilia
228ffe901d Update json formatting for legacy message requests
Legacy DataMessages are sent using the `body` field, new Content
messages are sent using the `content` field.

// FREEBIE
2015-06-17 12:29:39 -07:00
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.
2015-06-17 12:29:39 -07:00
lilia
757bcd4e50 Reset recipient typeahead after selecting a recipient 2015-06-17 12:29:34 -07:00
lilia
e9e875766f Group update recipient typeahead excludes exisiting members
Fixes #199

// FREEBIE
2015-06-17 12:21:58 -07:00
lilia
694f801676 Stop hiding inbox instead of closing
This behavior was intended to help keep the websocket alive, but keeping
the inbox window around can cause some stale frontend state. Also we now
have a keepalive alarm to check for new messages once a minute.
2015-06-15 17:48:06 -07:00
lilia
72f16b94ff Polish group update ux
* Show the members list as static elements
* Style the search results as a drop down, mirroring android ux

Fixes #248 // FREEBIE
2015-06-09 16:12:21 -07:00
lilia
23db5802cf Support custom placeholder on recipients input 2015-06-09 16:10:07 -07:00
lilia
9795b26bc1 Supress change event on avatarUrl initialization 2015-06-09 12:03:28 -07:00
lilia
ac401c78b3 Fix socket status indicator
It was not correctly reporting the status after a background page reload.
2015-06-09 11:30:45 -07:00
lilia
363c436b33 Handle single-error rejections when sending messages
We can not assume that we will get back an error array.

Closes #258 // FREEBIE
2015-06-05 17:29:31 -07:00
lilia
6e1a41e9cf Update inbox when group avatars change 2015-06-05 11:53:46 -07:00
lilia
583fb98cce Support late-addition of default image to file input
Fixes #256

// FREEBIE
2015-06-05 11:23:03 -07:00
lilia
061d57c95a Fix string vs number comparison
Fix bug in device storage causing duplicate device messages after a 410.
2015-06-04 16:48:34 -07:00
lilia
a9549e2e0f Fix 410 handling
We need to close the existing session with an old registrationId.
2015-06-04 16:48:10 -07:00
lilia
7d08e1132d Fix close session 2015-06-04 14:48:59 -07:00
lilia
f4a206b266 Scale and crop avatars to 256 square thumbnails.
Fixes #213 // FREEBIE
2015-06-04 14:46:16 -07:00
lilia
cdb7fcfbad Pass windows around to let file inputs work 2015-06-04 13:39:52 -07:00
lilia
3d1df790a5 Update the window title when a group title or contact name changes 2015-06-03 17:23:55 -07:00