Commit graph

249 commits

Author SHA1 Message Date
Greyson Parrelli e31029da89 Update recipient's sealed sender status in more places. 2018-10-31 11:18:35 -07:00
Greyson Parrelli 8c3d50c6dc Ignore messages without content. 2018-10-31 08:26:45 -07:00
Greyson Parrelli 2acab563d9 Support for sealed sender - Part 2 2018-10-30 08:48:08 -07:00
Moxie Marlinspike 5f31762220 Support for sealed sender - Part 1 2018-10-30 08:48:08 -07:00
Greyson Parrelli 1b736e9e04 Ensure notifications are processed after receiving GCM message.
It's unreliable to run these tasks on WorkManager, as there's no
scheduling guarantees.
2018-10-08 10:00:15 -07:00
Greyson Parrelli 87e6aa48bb Schedule jobs with WorkManager.
Should help solve most of our pressing targetSdk=26 migration issues.
2018-10-01 12:12:50 -07:00
Greyson Parrelli 6eb8693546 Don't block messages from unknown groups.
We were incorrectly considering unknown groups to have been "left".
2018-09-25 10:00:14 -07:00
Greyson Parrelli 45c4eafbd7 Add the ability to block groups.
This also fixes the situation where we block group-leave messages,
preventing blocked contacts from leaving groups.

Fixes #7970

Also, this forced us to upgrade libsignal-service, which fixes the
websocket timeout issues. Thanks to @dpapavas!

Fixes #6644
2018-09-18 15:26:50 -07:00
Greyson Parrelli e9b85a10a6 Add per-contact notification channels.
Fixes #8119
Fixes #8121
Fixes #8122
2018-08-17 15:51:01 -07:00
Greyson Parrelli 13c72779af Visually note quotes for messages you don't have.
We will now show a small footer under quotes for messages that you
don't have locally.

Also fixes #7850
2018-08-13 18:38:59 -04:00
Greyson Parrelli dbd42c4af2 Add notification channel support.
Bucket our notifications into channels. Required to target API 26.
2018-08-13 18:38:53 -04:00
Greyson Parrelli 43068e0613 Reduce usage of Log.w() 2018-08-06 10:50:06 -04:00
Greyson Parrelli a498176043 Switch logs to use new Log class. 2018-08-06 10:50:06 -04:00
Greyson Parrelli d42cecc32a Fix timer issue with sync messages from desktop.
Related to #8068
2018-08-03 14:08:16 -04:00
Greyson Parrelli bf692e8da3 Throttle background contact syncs to once every 6 hours.
Unfortunately, there's apps out there that trigger contact changes
very frequently. Because we listen to the system for contact
changes to tell us when to sync, that could result in us sending
an abundance of contact syncs to linked desktop instances.

This throttles contact sync requests using the following methodology:

- By default, throttle contact syncs to 6 hrs while the app is
  backgrounded.
- If a sync is throttled in the background, we set a dirty flag and
  will execute the sync the next time the app is foregrounded.
- Syncs explicitly requested by desktop are never throttled.
2018-07-17 12:06:50 -07:00
Greyson Parrelli b5d4cac90a Send/receive expiration times for group updates.
This particularly helps with the bug where people who were newly added
to a group wouldn't receive an expiration timer until the first message
was sent.
2018-06-22 11:01:55 -07:00
Greyson Parrelli 42f1baaf61 Imported JobManager as a source dependency.
We have to make some changes, and it's gotten to the point where
maintaining it as a separate library is more hassle than it's worth,
especially with Google releasing WorkManager as the preferred job
scheduling library.
2018-06-22 10:59:53 -07:00
Greyson Parrelli 54dbffaf30 Added ability to share contacts.
The "contact" option in the attachments tray now brings you through an
optimized contact sharing flow, allowing you to select specific fields
to share. The contact is then presented as a special message type,
allowing you to interact with the card to add the contact to your system
contacts, invite them to signal, initiate a signal message, etc.
2018-05-21 15:45:22 -04:00
Greyson Parrelli 43622e603d Save replies in drafts.
Previously, quotes were not saved to drafts, meaning they would be lost
when leaving the conversation or app. Now, a QuoteId (which represents
the necessary data to restore the QuoteModel) is serialized and stored
in the DraftDatabase.

Fixes #7716
Closes #7729
2018-04-26 09:19:22 -07:00
Greyson Parrelli fa99e8f0d0 Updated reply-to UI.
All UI components are now properly styled and functioning according to
spec.
2018-04-16 17:33:26 -07:00
Moxie Marlinspike d567534609 replies 2018-04-16 17:33:26 -07:00
Sam Lanning 69f180a5ec Fix some potential integer overflows for expiration time
In a number of locations in the code, there were conversions of message
expiration times from seconds to milliseconds, and then assigned to `long`
contexts. However these conversions were being done as integer multiplication
rather than long multiplication, meaning that there was a potential for
overflows.

Specifically, the maximum value that could be represented before overflowing
was (2^31 / 1000 / 60 / 60 / 24) days = 24.8 days (< 1 month). Luckily the
current allowed timeouts are all less than that value, but this fix would
remove the artificial restriction, effectively allowing values of 1000x greater
(68 years), at least for android.

Related #5775
Closes #7338
2018-03-07 09:55:24 -08:00
Moxie Marlinspike 9d5d43cf3a Wait to process messages until after migration when screenlocked
Fixes #7390
2018-02-04 11:26:02 -08:00
Moxie Marlinspike f36b296e2e Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
Moxie Marlinspike 4de14a5dc1 Only use startForegroundService for initial service construction 2017-12-15 09:45:00 -08:00
Moxie Marlinspike acfc9d75e0 Use startForegroundService instead of startService on Android 8 2017-11-30 10:26:41 -08:00
haffenloher 3df9112cf8 Fix synced sent media messages expiring too fast
Fixes #6928
Closes #7135
2017-11-01 15:56:46 -07:00
Moxie Marlinspike 2c1337b33e Make early receipts work in group messages
For both conversation item view and message details view

// FREEBIE
2017-10-02 14:54:55 -07:00
Moxie Marlinspike 856a4d2860 Process configuration request messages
// FREEBIE
2017-10-02 12:39:44 -07:00
Moxie Marlinspike 285947eb66 Show per-member delivery/read status on message info in groups
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike cb9bc9659b Support for read receipts
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike 3e3ae5f865 Adjust profile key sharing based on sync messages
// FREEBIE
2017-08-28 17:57:07 -07:00
Moxie Marlinspike d0cd2621ca Only process messages if a body is present
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 51c1e4485f Support for profile key syncing to sibling devices
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike f17af19d09 Access all RecipientDatabase settings directly from Recipient
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike d1790dfe17 Rename RecipientPreferences -> RecipientSettings
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 8e6ca53023 Rename RecipientPreferencesDatabase -> RecipientDatabase
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 6924f0519e No need for a RecipientFactory any longer
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 77a216b705 Support for retrieving and storing profile information
Initial support for sharing profile keys

// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 375207f073 Switch MMS groups to use the group database infrastructure
Eliminate the concept of 'Recipients' (plural). There is now just
a 'Recipient', which contains an Address that is either an individual
or a group ID.

MMS groups now exist as part of the group database, just like push
groups.

// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 737810475e Remove the Canonical Address Database
This was a holdover from Signal's origins as a pure SMS app.
It causes problems, depends on undefined device specific behavior,
and should no longer be necessary now that we have all the
information we need to E164 all numbers.

// FREEBIE
2017-07-31 12:02:29 -07:00
Moxie Marlinspike 82b5b35d3b Eliminate MediaNetworkRequirement style attachment job handling
// FREEBIE
2017-07-21 15:59:27 -07:00
Moxie Marlinspike 074e46b2d9 Enable verification syncing
// FREEBIE
2017-06-23 13:59:06 -07:00
Moxie Marlinspike 1eccc07673 Temporarily disable synchronization messages
Until desktop catches up

// FREEBIE
2017-06-12 09:47:58 -07:00
Moxie Marlinspike 76c28cfa7a Add support for SN verification
// FREEBIE
2017-06-09 19:58:01 -07:00
Moxie Marlinspike b50a3fa2b8 Actually handle busy signal correctly
// FREEBIE
2017-06-01 13:11:48 -07:00
Moxie Marlinspike 51d6144591 Significant MMS changes
1) Remove all our PDU code and switch to the PDU code from the
   klinker library

2) Switch to using the system Lollipop MMS library by default,
   and falling back to our own custom library if that fails.

3) Format SMIL differently, using code from klinker instead of
   what we've pieced together.

4) Pull per-carrier MMS media constraints from the XML config
   files in the klinker library, instead of hardcoding it at 280kb.

Hopefully this is an improvement, but given that MMS is involved,
it will probably make things worse instead.
2017-05-08 18:14:55 -07:00
Moxie Marlinspike cb670d6783 Improve UI send latency
// FREEBIE
2017-04-26 10:27:30 -07:00
Moxie Marlinspike f67eb5f9f3 Support for receiving arbitrary attachment types
// FREEBIE
2017-03-29 18:17:34 -07:00
Moxie Marlinspike a8366387ab Fix the build
// FREEBIE
2017-03-14 15:47:08 -07:00
haffenloher 66c9fd44df Honor synced end session messages
Fixes #5174
Closes #5178
2017-03-14 14:07:18 -07:00
Moxie Marlinspike 2f46c6ca1f Don't redisplay notifications after they have been dismissed
Fixes #5751
Fixes #6218
// FREEBIE
2017-03-14 10:09:24 -07:00
Moxie Marlinspike 8cd50d1e82 Update last seen state on desktop sync send
// FREEBIE
2017-02-22 15:05:35 -08:00
Moxie Marlinspike ea0945d406 Beta support for webrtc video and voice calling
// FREEBIE
2017-02-01 13:55:52 -08:00
Moxie Marlinspike 7e51d61c79 Ignore duplicate signal messages
Fixes #5579

// FREEBIE
2017-01-22 14:47:02 -08:00
Moxie Marlinspike cb23e3a930 Untrusted identity is not always a legacy message content
Closes #5924
Fixes #5922
// FREEBIE
2017-01-12 10:33:23 -08:00
Moxie Marlinspike cdf3a849e9 Reduce DB updates on send path, move support SDK up to 24
// FREEBIE
2017-01-02 17:17:48 -08:00
Moxie Marlinspike cf01959e16 Support recovering forgotten/unknown group info from sender
Closes #5876
// FREEBIE
2016-12-01 10:34:47 -08:00
Moxie Marlinspike 3787551878 Squelch notifications for active desktop converastions
Additionally, limit audible notifications to once every 2 seconds.

// FREEBIE

Fixes #4905
Fixes #3165
Closes #5813
2016-11-24 08:09:34 -08:00
Moxie Marlinspike 5ed1c9c72b Fix for expiration update sync sent messages
// FREEBIE
2016-10-03 12:48:30 -07:00
Moxie Marlinspike 68b48ebe00 Start disappearing message timer on read sync messages
Fixes #5733
// FREEBIE
2016-10-02 12:08:30 -07:00
Moxie Marlinspike 32f5bd5336 Support for syncing contact colors and block lists
Closes #5638
// FREEBIE
2016-09-14 16:37:28 -07:00
Moxie Marlinspike d7e4928f22 Support for disappearing messages
// FREEBIE
2016-08-28 17:03:23 -07:00
Moxie Marlinspike 7b589c4300 TextSecure is now SignalService
// FREEBIE
2016-03-24 14:05:56 -07:00
Moxie Marlinspike 08e2221dc0 Support for synchronizing read state to/from desktop
// FREEBIE
2016-02-19 17:07:41 -08:00
Moxie Marlinspike 6da86e482d Support for dual-sim SMS/MMS functionality
Allow source selection for sending SMS/MMS, and display the
SIM that received SMS/MMS.

Fixes #555
Closes #5199
// FREEBIE
2016-02-09 16:53:15 -08:00
Moxie Marlinspike e32736359b Move group message to group after accepting new identity key
Fixes #2739
// FREEBIE
2015-12-10 05:04:03 -08:00
Moxie Marlinspike 073be6696b Mark threads as read when we get an outgoing sync message
// FREEBIE
2015-11-26 07:24:57 -08:00
Moxie Marlinspike 25e099a309 Fix two message ordering issues.
1) The group ID for jobs that process received messages was
   previously set to the sender's e164.  This guaranteed
   serialization of messages per-recipient, while allowing
   processing of multiple recipients in parallel.  Unfortunately
   in the case of groups, this results in out of order
   conversations, since the "sender" for each message is
   different.  And we can't determine that it was a group
   message until *after* we process it.  So this change just
   puts all message processing from all senders in one big queue.

2) Synchronization messages were always being displayed before
   received messages, due to the "received time" for those
   being set to the time they were sent.

Fixes #3618
Fixes #2385

// FREEBIE
2015-10-16 10:07:50 -07:00
Moxie Marlinspike 5fd9874ab6 Support for group update messages from paired devices.
Fixes #3566
// FREEBIE
2015-10-15 17:10:54 -07:00
Moxie Marlinspike 09e52834a6 Refactor "parts" to contain MMS/PDU madness to MMS code paths.
Closes #4248
// FREEBIE
2015-10-15 11:11:39 -07:00
Moxie Marlinspike d9a3f5a3b8 Fix up security initialization stuff in ConversationActivity
// FREEBIE
2015-09-30 14:30:10 -07:00
Jake McGinty 80ce83ef9d Media download controls
Closes #3991
// FREEBIE
2015-09-03 11:40:55 -07:00
Moxie Marlinspike d2a728fc08 Display notification after upgrade migration w/ password.
// FREEBIE
2015-07-21 16:03:56 -07:00
Moxie Marlinspike 90d5e9dccd Fix for double notification when locked.
Fixes #3702
// FREEBIE
2015-07-20 18:00:48 -07:00
Moxie Marlinspike fda900e95d Fix for receiving message after upgrade with no MS set.
// FREEBIE
2015-07-17 18:02:17 -07:00
Moxie Marlinspike 8d9ae731ef Only use MasterSecret for local message encryption.
Not for the axolotl store.

// FREEBIE
2015-07-16 11:15:56 -07:00
Moxie Marlinspike c920146bff Set serialVersionUID for all modified jobs.
At least this won't continue to fuck us up.

// FREEBIE
2015-06-24 18:30:55 -07:00
Moxie Marlinspike 2c9c9891c6 Support for multi-device group sync and group requests.
// FREEBIE
2015-06-24 18:30:55 -07:00
Moxie Marlinspike bf3c1d3745 Support for device management, limits, and contact requests.
// FREEBIE
2015-06-24 18:30:55 -07:00
Moxie Marlinspike 3c41f27298 Support for multi-device contact sync.
// FREEBIE
2015-06-24 18:30:55 -07:00
Moxie Marlinspike ec60c24849 Slight cleanup for ConfirmIdentityDialog change.
Closes #3225
// FREEBIE
2015-06-03 11:11:23 -07:00
Moxie Marlinspike 2cfc714b64 Support for receiving incoming sync messages.
Closes #3188
// FREEBIE
2015-05-21 09:55:42 -07:00
Moxie Marlinspike 7a023b9fdc Acquire wakelocks for incoming messages.
Closes #2717

// FREEBIE
2015-03-19 11:19:53 -07:00
Moxie Marlinspike a4e18c515c Remove encrypted SMS transport, simplify transport options.
Closes #2647

// FREEBIE
2015-03-12 17:53:38 -07:00
Moxie Marlinspike 41fadc3437 Use libtextsecure 1.2.2
// FREEBIE
2015-03-10 18:59:12 -07:00
Moxie Marlinspike 5602a3dfc0 Update to latest version of libtextsecure for simplified interface.
1) Switch to new TextSecureAddress addressing, rather than mixing
   long-based recipient IDs into libtextsecure.

2) Get rid of RecipientFormattingException throws in calls to
   RecipientFactory.

Closes #2570
2015-03-03 12:25:09 -08:00
Moxie Marlinspike 00d7b5c284 Better UX handling on identity key mismatches.
1) Migrate from GSON to Jackson everywhere.

2) Add support for storing identity key conflicts on message rows.

3) Add limited support for surfacing identity key conflicts in UI.
2015-02-27 12:26:09 -08:00
Moxie Marlinspike d4493e700e Add GroupId for received messages.
// FREEBIE
2015-02-23 09:53:32 -08:00
Moxie Marlinspike d3271f548c Support for retrieving stored messages via websocket.
1) When registering with server, indicate that the server should
   store messages and send notifications.

2) Process notification GCM messages, and connect to the server
   to retrieve actual message content.
2015-02-18 11:09:01 -08:00
Moxie Marlinspike 978f769d6d Notify on incoming messages when locked.
// FREEBIE

Fixes #2149
2014-12-04 15:49:09 -08:00
Moxie Marlinspike 08ed90c5ec Split out Util functions. 2014-11-12 15:42:43 -08:00
Moxie Marlinspike 0d06d50a65 Let's have JobManager only deal with checked exceptions.
Also, switch to Builder for JobManager construction.
2014-11-12 15:29:58 -08:00
Moxie Marlinspike d9d4ec9d9d Fix some bugs with PKWM padding and attachment detection. 2014-11-12 15:29:58 -08:00
Moxie Marlinspike 9a6f65988f Add support for dependency injection, and accompanying tests. 2014-11-12 15:29:58 -08:00
Moxie Marlinspike ae178fc4ec Move API around a little, eliminate TransportDetails interface. 2014-11-12 15:26:25 -08:00
Moxie Marlinspike cafe03a70a Transition the outbound pipeline to JobManager jobs. 2014-11-12 15:26:25 -08:00
Moxie Marlinspike 99f42e2ee1 Move API around. 2014-11-12 15:21:32 -08:00
Moxie Marlinspike a3f1d9cdfd Beginning of libtextsecure refactor.
1) Break out appropriate components.

2) Switch the incoming pipeline from SendReceiveService to
   the JobManager.
2014-11-12 15:21:32 -08:00