Commit graph

39 commits

Author SHA1 Message Date
Lilia
52cc8355a6 Feature: Blue check marks for read messages if opted in (#1489)
* Refactor delivery receipt event handler

* Rename the delivery receipt event

For less ambiguity with read receipts.

* Rename synced read event

For less ambiguity with read receipts from other Signal users.

* Add support for incoming receipt messages

Handle ReceiptMessages, which may include encrypted delivery receipts or read
receipts from recipients of our sent messages.

// FREEBIE

* Rename ReadReceipts to ReadSyncs

* Render read messages with blue double checks

* Send read receipts to senders of incoming messages

// FREEBIE

* Move ReadSyncs to their own file

// FREEBIE

* Fixup old comments on read receipts (now read syncs)

And some variable renaming for extra clarity.

// FREEBIE

* Add global setting for read receipts

Don't send read receipt messages unless the setting is enabled.
Don't process read receipts if the setting is disabled.

// FREEBIE

* Sync read receipt setting from mobile

Toggling this setting on your mobile device should sync it to Desktop. When
linking, use the setting in the provisioning message.

// FREEBIE

* Send receipt messages silently

Avoid generating phantom messages on ios

// FREEBIE

* Save recipients on the outgoing message models

For accurate tracking and display of sent/delivered/read state, even if group
membership changes later.

// FREEBIE

* Fix conversation type in profile key update handling

// FREEBIE

* Set recipients on synced sent messages

* Render saved recipients in message detail if available

For older messages, where we did not save the intended set of recipients at the
time of sending, fall back to the current group membership.

// FREEBIE

* Record who has been successfully sent to

// FREEBIE

* Record who a message has been delivered to

* Invert the not-clickable class

* Fix readReceipt setting sync when linking

* Render per recipient sent/delivered/read status

In the message detail view for outgoing messages, render each recipient's
individual sent/delivered/read status with respect to this message, as long as
there are no errors associated with the recipient (ie, safety number changes,
user not registered, etc...) since the error icon is displayed in that case.

*Messages sent before this change may not have per-recipient status lists
and will simply show no status icon.

// FREEBIE

* Add configuration sync request

Send these requests in a one-off fashion when:
  1. We have just setup from a chrome app import
  2. We have just upgraded to read-receipt support

// FREEBIE

* Expose sendRequestConfigurationSyncMessage

// FREEBIE

* Fix handling of incoming delivery receipts - union with array

FREEBIE
2017-10-04 15:28:43 -07:00
Lilia
ae190fed44
Profiles (#1453)
* Add AES-GCM encryption for profiles

With tests.

* Add profileKey to DataMessage protobuf

// FREEBIE

* Decrypt and save profile names

// FREEBIE

* Save incoming profile keys

* Move pad/unpad to crypto module

// FREEBIE

* Support fetching avatars from the cdn

// FREEBIE

* Translate failed authentication errors

When AES-GCM authentication fails, webcrypto returns a very generic error. The
same error is thrown for invalid length inputs, but our earlier checks in
decryptProfile should rule out those failure modes and leave us safe to assume
that we either had bad ciphertext or the wrong key.

// FREEBIE

* Handle profile avatars (wip) and log decrypt errors

// FREEBIE

* Display profile avatars

Synced contact avatars will still override profile avatars.

* Display profile names in convo list

Only if we don't have a synced contact name.

// FREEBIE

* Make cdn url an environment config

Use different ones for staging and production

// FREEBIE

* Display profile name in conversation header

* Display profile name in group messages

* Update conversation header if profile avatar changes

// FREEBIE

* Style profile names small with ~

* Save profileKeys from contact sync messages

// FREEBIE

* Save profile keys from provisioning messages

For standalone accounts, generate a random profile key.

// FREEBIE

* Special case for one-time sync of our profile key

Android will use a contact sync message to sync a profile key from Android
clients who have just upgraded and generated their profile key. Normally we
should receive this data in a provisioning message.

// FREEBIE

* Infer profile sharing from synced data messages

* Populate profile keys on outgoing messages

Requires that `profileSharing` be set on the conversation.

// FREEBIE

* Support for the profile key update flag

When receiving a message with this flag, don't init a message record, just
process the profile key and move on.

// FREEBIE

* Display profile names in group member list

* Refresh contact's profile on profile key changes

// FREEBIE

* Catch errors on profile save

// FREEBIE

* Save our own synced contact info

Don't return early if we get a contact sync for our own number

// FREEBIE
2017-09-14 17:04:00 -07:00
Scott Nonnenberg
f414c13220 Protos: Update to optional verified in sync (was: repeated)
This means that we no longer need to iterate.

FREEBIE
2017-08-04 12:03:25 -07:00
lilia
1e93b12b90 Update protos with support for null messages
// FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
20f4d48991 Protos: Move to latest iteration of verification protos
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
3360f65fac Protos: Update spacing to match libsignal-service-java
FREEBIE
2017-08-04 12:03:25 -07:00
Scott Nonnenberg
0caba71901 Protos: Re-order ContactDetails and GroupDetails to match iOS
FREEBIE
2017-06-15 16:13:46 -07:00
Scott Nonnenberg
3d65581c30 Protos: Put avatar in each message type like iOS/Android
FREEBIE
2017-06-15 16:13:46 -07:00
Scott Nonnenberg
b940988da5 Protos: Add support for synchronizing verification of contacts
FREEBIE
2017-06-15 16:13:46 -07:00
Scott Nonnenberg
0eacb8780a Protos: Add support for requesting group context
FREEBIE
2017-06-15 16:13:46 -07:00
Scott Nonnenberg
165217d020 Protos: Add support for the contact sync end event
FREEBIE
2017-06-15 16:13:46 -07:00
Scott Nonnenberg
7b62c4184e Protos: Sync spacing with iOS version of protos
FREEBIE
2017-06-15 16:13:46 -07:00
lilia
6055e9ce55 Add voice note flag to protobufs 2017-05-12 09:55:15 -07:00
lilia
fc514aa96f Add support for attachment file names
Send, receive, and save attachment filenames. Use them as suggested
names when saving files.

// FREEBIE
2017-04-18 11:48:56 -07:00
lilia
43de0cc2ec Add attachment digests
// FREEBIE
2017-03-10 14:40:45 -08:00
lilia
c8a0fe5a92 Add CallMessage protos 2017-02-22 15:41:12 -08:00
lilia
b3e932dce8 Add protocol support for disappearing messages 2016-09-28 17:20:02 -07:00
lilia
b1afb79a14 Set theme based on master device userAgent
// FREEBIE
2016-09-15 16:28:46 -07:00
lilia
f610233ef6 Add support for syncing blocked numbers
// FREEBIE
2016-09-07 13:04:45 -07:00
lilia
53f20640af Add support for syncing colors
// FREEBIE
2016-09-07 13:04:45 -07:00
lilia
4169336776 Update libsignal protobuf package name
// FREEBIE
2016-04-21 19:30:34 -07:00
lilia
781ada64ca Add libtextsecure support for syncing read messages
Plumbing for sending and receiving a new sync protobuf for marking
messages read on/from my other devices.

// FREEBIE
2016-02-22 17:11:17 -08:00
lilia
010297f4c5 Track groups I've left
// FREEBIE
2016-02-22 17:11:16 -08: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
2f935dfd5e Add contact sync request protocol 2015-06-25 13:24:31 -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
Matt Corallo
2277b41639 Remove non-existant device messages 2015-02-26 12:13:56 -08:00
lilia
104b49c371 Add SyncMessageContext
The sync field on a push message content indicates that this is a sync
message from a master or sibling device and what conversation it belongs
to.
2015-02-12 17:42:16 -08:00
Matt Corallo
184b1ec89c Move protocol protobufs to libaxolotl/, handling DeviceControl 2015-02-12 15:11:58 -08:00
Matt Corallo
02d0c58e5e Mostly done device-bringup stuff 2015-02-11 14:03:54 -08:00
Matt Corallo
29b2ffc769 Update to real server provisioning API 2015-01-19 10:23:25 -10:00
lilia
7f04439b37 New websocket protocol 2014-11-14 17:48:57 -08:00
Matt Corallo
f6f35c5b61 Fix a missing function and dont blow up on delivery receipts 2014-07-26 01:53:24 -04:00
Matt Corallo
a6b0d1f84b Add entirely untested secondary device init 2014-07-26 01:32:05 -04:00
Matt Corallo
eab0911d3d I lied, there is no verification tag 2014-07-24 05:14:38 -04:00
Matt Corallo
1d2e252595 Update WhisperTextProtocol for v3 2014-07-22 21:23:35 -04:00
Matt Corallo
288d66b4a3 New protos with group messaging stuff 2014-03-12 12:54:39 -07:00
Matt Corallo
fe570c754a Genericify initSession (and break it for alice) 2014-03-08 19:08:40 -04:00
Matt Corallo
eec4c66ef6 Fixup dir structure 2014-01-22 03:28:35 +00:00