Commit graph

481 commits

Author SHA1 Message Date
Matt Corallo
2277b41639 Remove non-existant device messages 2015-02-26 12:13:56 -08:00
Matt Corallo
5abf3073d5 Check END_SESSION messages in processDecrypted 2015-02-26 12:11:05 -08:00
Matt Corallo
29192edcb8 Ignore END_SESSION on messages with a sync context 2015-02-26 12:11:04 -08:00
Matt Corallo
9c3f8a1868 Dont send group-update right before we quit the group
Fixes #166
2015-02-25 15:59:49 -08:00
lilia
fd30dc6f1a Add message detail view 2015-02-23 14:03:35 -08:00
lilia
368cd2f79a Refactor back button style
Make it easier to reuse these styles.
2015-02-23 12:52:15 -08:00
Matt Corallo
f2853d00e6 Merge pull request #167 from WhisperSystems/sync
Sync outgoing individual and group messages
2015-02-20 12:39:26 -08:00
lilia
f860cb4492 Return end session messages to the frontend
So we can save them in the message history, and because the caller
expects a promise.
2015-02-20 10:30:43 -08:00
lilia
55c46d1bb6 Close conversation menu when clicking outside it 2015-02-19 11:55:31 -08:00
lilia
e853c21c98 Remove unused code
There is no .settings-btn or .go-back in this view.
2015-02-19 11:00:29 -08:00
lilia
ec43a0b633 jshint all the things
Small style fixes here and there. Removed one unused file.
2015-02-19 00:22:23 -08:00
lilia
09704444e9 Fix missing delivery receipt checkmarks
The delivered class should be updated on each render to ensure it is
up to date.
2015-02-18 23:57:19 -08:00
lilia
06e8e0dca7 Remove an extension.trigger
No need to trigger an extension-wide event now that all our models live
in the background page. We can just update them more or less directly.
2015-02-18 23:56:13 -08:00
lilia
626b63ee7c Fix some jshints 2015-02-18 23:41:45 -08:00
lilia
3292177a96 Remove resize logic in favor of pure css 2015-02-18 23:09:34 -08:00
lilia
07e44ccf21 Revisit resize and scroll logic once more
Wait a little longer on initial scroll down. Previous timeout sometimes
triggered before all text is finished rendering.

Remove redundant resize calls.
2015-02-18 16:54:43 -08:00
lilia
1bdb42b67e Fix bug loading conversation upsidedown
Sometimes a conversation's messages would be reverse-ordered on first
load, correcting themselves after a refresh. This is an artifact of the
order we load messages from the database. To fix, load them in the
opposite order.

The alternative solution would be to reset the collection every time we
fetch new messages, but this would create an entirely new set of model
objects each time, which seems unnecessary.
2015-02-18 15:40:34 -08:00
lilia
296dae544d Open conversation on receiving a message w/ errors 2015-02-18 12:17:46 -08:00
lilia
955ef60292 Fix list_view-related error in background page
Background page conversations were trying to trigger events on the inbox
list view which had been destroyed, resulting in a background page
console error of "can't read innerHeight of null".

Avoid this by removing listeners when the inbox window is closed.
2015-02-18 11:26:18 -08:00
lilia
1c589f2fad Fix list_view.js and message_view.js whitespace 2015-02-18 00:11:35 -08:00
lilia
61581bae7f Fix inbox comparator 2015-02-18 00:11:35 -08:00
lilia
4716754209 Refactor content message class names 2015-02-18 00:11:35 -08:00
lilia
40351fcc54 Sync outgoing messages
When sending an constrct a copy of the PushMessageContent protobuf, add
a SyncMessageContext, and send it to ourselves. Do this for all kinds of
group messages, and individual text/media messages, but not closeSession
messages as the latter are device-specific.

Do not sync messages if we are the primary device, which should only be
supported in development. Normal web clients must be paired with a
android or ios master device, and even in dev, a primary/standalone web
client does not support linking additional devices.
2015-02-17 14:10:42 -08:00
lilia
94c94eb7c9 Refactor message view
The message view has three flavors so far, a normal text+attachments
message, a group update, and an end session message. This changeset
extracts the normal message rendering into its own subview, and adds
some convenience functions to the message model in order to simplify
some of that flavoring logic.
2015-02-17 12:07:46 -08:00
lilia
85bec04010 Render leave-group messages correctly 2015-02-16 12:47:36 -08:00
lilia
367421d40a Style end session messages
Also add a missing call to render()
2015-02-13 16:21:39 -08:00
lilia
f00a8f1e81 Render end session messages correctly 2015-02-13 14:25:16 -08:00
lilia
488f25635d Wire up end session and leave group
Closes #136
Closes #137
2015-02-13 14:25:16 -08:00
lilia
85b4643e9b Fixes #161
The first message sent to a new contact was throwing 'Unknown Group'.
This was because we didn't wait for the initial save to sync the `type`
attribute to indexedDB. Instead, don't trigger the conversation to open
until it has finished saving.
2015-02-13 12:57:19 -08:00
Matt Corallo
b45c09470f Merge pull request #155 from WhisperSystems/closeSession
Fix textsecure.closeSession
2015-02-13 10:44:06 -08:00
Matt Corallo
04b1ab23a4 Merge pull request #154 from WhisperSystems/fixolotl
Fix provisioning flow
2015-02-13 10:43:35 -08:00
lilia
0e8a5806a8 Fix textsecure.closeSession
sendIndividualProto requires a timestamp.
2015-02-12 22:12:48 -08:00
lilia
96af6b56ef Handle incoming sync messages
Assign them to the correct conversation and mark them outgoing with the
correct timestamp.

Closes #150
2015-02-12 18:17:08 -08:00
lilia
65c70a9117 Fix provisioning flow
Fix undefined axolotl.protobufs.ProvisionMessage, referenced in
libaxolotl/protocol.js
2015-02-12 16:41:04 -08:00
Matt Corallo
148410a826 Move jquery dep from libaxolotl to libaxolotl tests 2015-02-12 15:12:02 -08:00
Matt Corallo
44a094c324 Re-run concat 2015-02-12 15:12:01 -08:00
Matt Corallo
f1f5914879 Re-run concat 2015-02-12 15:12:00 -08:00
Matt Corallo
cb6cb4ff89 Re-add jquery as it is needed for our test runners 2015-02-12 15:11:59 -08:00
Matt Corallo
8398a52c20 Re-run concat 2015-02-12 15:11:58 -08:00
Matt Corallo
bb32a51d66 s/textsecure.protocol/axolotl.protocol/ 2015-02-12 15:11:58 -08:00
Matt Corallo
403ae4376d Move attachment/websocket [en|de]cryption to libtextsecure 2015-02-12 15:11:58 -08:00
Matt Corallo
184b1ec89c Move protocol protobufs to libaxolotl/, handling DeviceControl 2015-02-12 15:11:58 -08:00
lilia
05a5b7e76c Fixes #152
Android client was crashing any time the base64-encoded public key
included a '+' due to lack of url encoding.
2015-02-12 15:09:52 -08:00
lilia
a104ee9ca6 Remove unused variables 2015-02-12 14:19:37 -08:00
lilia
44f9ea5d49 Fix identity key error rendering 2015-02-12 13:36:19 -08:00
lilia
9fe99adf0c Get scrolling right on conversation load 2015-02-12 13:21:18 -08:00
lilia
f5c7be7d35 Add some resizes 2015-02-12 13:21:18 -08:00
lilia
5a302271b3 Remove unneeded listeners 2015-02-12 13:21:18 -08:00
lilia
0463e385e8 Remove uneeded render
This is an artifact of a time when conversation elements would pop in
and out of the dom at a moment's notice, and thus needed to rebind their
event listeners regularly.
2015-02-12 13:21:18 -08:00
lilia
5e064db28f Render the message list view. 2015-02-12 13:21:17 -08:00