Commit graph

900 commits

Author SHA1 Message Date
Thomas Guillet
f1b4bd772c Prevent bogus message emission on group deletion
Only send a message if the local number is part of the group

* Fix error on empty group #1449
* Fix an unlogged issue about notification sent to group members even is the local user already quit the group
2016-11-17 13:41:32 -05:00
Russ Shanahan
087f753979 Voiceover fix- Do not read "no messages" text when it's hidden (#1437) FREEBIE 2016-11-17 13:31:46 -05:00
Russ Shanahan
b40f6acd01 Voiceover fix: Message author read as thread name (#1437) FREEBIE
There was a bug in voiceover mode. When reading messages, Voiceover
would read out "message author: message content" for each chat bubble,
but the message author was always the name of the chat. So if it was
a contact chat, every message would be read as if from the other party,
and if it was a group chat, every message would be from the title of
the group.

This patch looks up the display name for the given signal id so
Voiceover reads the correct name for each message. It will read "Me" if
the message is outgoing.
2016-11-17 13:31:46 -05:00
Michael Kirk
89451013d9 Bump build target
// FREEBIE
2016-11-17 13:31:46 -05:00
Malcolm Hall
5213822e77 Update BUILDING.md
Added required instructions for building under a different team.
2016-11-17 13:16:46 -05:00
Michael Kirk
88d9ef987f Share dialog for Safety Numbers
// FREEBIE
2016-11-15 18:44:52 -05:00
Michael Kirk
9b2c03793c [SSK] explicit newlines in safety numbers
// FREEBIE
2016-11-14 17:40:51 -05:00
Michael Kirk
d76f26e43b Bump version.
This might look like a typo, but due to earlier flubbing the build
number, we need a larger build number to be able to upload, until the
next release at which point we can resume a sane bundle version number.

// FREEBIE
2016-11-14 15:16:51 -05:00
Michael Kirk
ee29fff0da [SSK] Default to blocking changed Safety Numbers
// FREEBIE
2016-11-14 14:24:03 -05:00
Michael Kirk
eb995cb389 revert to tracking longform build
We use this to determine which legacy migrations to run.

Also, soften the "your device is too old" behavior to just exit, rather
than blow away the users installation. Ouch!

* bump version

// FREEBIE
2016-11-14 13:34:39 -05:00
Michael Kirk
7cae804217 Update translations, bump build.
// FREEBIE
2016-11-14 11:36:32 -05:00
Michael Kirk
f8da3132f4 Bump build
// FREEBIE
2016-11-14 09:26:30 -05:00
Michael Kirk
c5be8f2d88 Don't include phone number in scannable safety number QR code
also fixes #1455

// FREEBIE
2016-11-14 09:12:24 -05:00
Michael Kirk
d3c2f44aeb Exclude extra data detectors.
Data detectors work by matching local text against a series of local
matchers. No network activity is required. Some of the data detectors
are really useful (e.g. a link, or being able to copy a phone number).

Some aren't very useful, e.g. pop culture references, and seeing things
underlined is giving people the false impression that their data is
being inspected remotely.

// FREEBIE
2016-11-14 08:58:22 -05:00
Michael Kirk
fbcf5fbf07 Properly assign global contacts updater to environment
broken in 33f6a95520

// FREEBIE
2016-11-13 12:39:08 -05:00
Michael Kirk
ddeadafc3b Don't show own addressbook info in settings
Some folks get the wrong idea and think Signal Service knows their name,
when really, we were just showing them the entry for the registered
phone number in their address book.

In any case, presumably the user already knows their name, so we don't
need to remind them.

// FREEBIE
2016-11-13 11:49:39 -05:00
Michael Kirk
7bcf5190b4 Address some lingering emoji cropping
This is an expedient, but not good, "fix". Some messages are going to
have extra space at the bottom of the bubble. But, for the time being,
that's preferable to getting messages clipped.

// FREEBIE
2016-11-13 11:48:05 -05:00
Michael Kirk
01a3ef015f Don't show permissions pop-up until user has seen contact disclaimer (#1456)
// FREEBIE
2016-11-12 15:32:45 -05:00
Michael Kirk
3bbdd13fbe Bump version
// FREEBIE
2016-11-11 09:13:38 -05:00
Michael Kirk
c2aa17e362 Changed Safety numbers no longer block communication
When your partner changes their identity key (e.g. by reinstalling),
you'll see a notice alongside their message, but it will no longer
prevent the message from showing. aka "non blocking".

Existing users will be opted into the previous blocking behavior.

This is configurable for all users in Settings > Privacy.

// FREEBIE
2016-11-11 09:13:38 -05:00
Michael Kirk
28a2a4610c Fix compiler warnings.
// FREEBIE
2016-11-11 08:54:13 -05:00
Michael Kirk
1da7b3b2cf bump build
// FREEBIE
2016-11-10 10:48:07 -05:00
Michael Kirk
368db7e553 [SSK] Only need to fetch prekey once
Plus related rate limit translations

// FREEBIE
2016-11-10 10:47:49 -05:00
Michael Kirk
4c5bc1ed6f Fix fingerprint Label copying
failed to update storyboard when class was renamed.

// FREEBIE
2016-11-10 10:27:11 -05:00
Michael Kirk
96c5ab0111 Bump build
// FREEBIE
2016-11-09 14:06:06 -05:00
Michael Kirk
49e5b19487 Update translations
// FREEBIE
2016-11-09 14:05:02 -05:00
Michael Kirk
c7a2fd30c2 Bump build
// FREEBIE
2016-11-09 13:50:10 -05:00
Michael Kirk
23c80748e6 Hide safety numbers until you've exchanged keys
// FREEBIE
2016-11-09 13:43:07 -05:00
Michael Kirk
225c5ecfb7 Merge branch 'jaropawlak/master' (#1408)
Alert when missing camera permissions

// FREEBIE
2016-11-08 17:20:03 -05:00
Michael Kirk
b8fc4001ec Camera permission fixup
- remove unknown segue, otherwise couldn't compile project
- translated english strings
- added translation comments
- reused existing "dismiss" string
- deselected row after dismissing permissions alert in linked devices
  screen

// FREEBIE
2016-11-08 17:16:19 -05:00
Jarosław Pawlak
c152c1c83a asking for camera permissions #1363 2016-11-08 16:28:24 -05:00
Michael Kirk
1912fbde72 [SSK] Send group messages as long as one recipient is found
// FREEBIE
2016-11-08 15:20:57 -05:00
Michael Kirk
c401f764ef [SSK] Fix crash on messaging unregistered user
// FREEBIE
2016-11-07 19:52:05 -05:00
Pawel Jurczyk
fd89458814 Adds comment on running carthage, which is neccessary to build the project.
// FREEBIE
2016-11-05 12:48:05 -04:00
Michael Kirk
79d5cf9e93 bump version
// FREEBIE
2016-11-04 17:45:28 -04:00
Michael Kirk
1bf77e8261 dismiss keyboard when showing corrupted message actionsheet
otherwise the keyboard covers the actionsheet.

// FREEBIE
2016-11-04 17:45:28 -04:00
Michael Kirk
21d37a92e5 Fix crash on nil image.
The only case I've actuall seen this is when a download is removed from
the file system, outside of Signal.

// FREEBIE
2016-11-04 17:39:28 -04:00
Michael Kirk
82c903b5da bump build
// FREEBIE
2016-11-04 16:47:05 -04:00
Michael Kirk
ddf0890408 Fix crash on nil message
// FREEBIE
2016-11-04 16:32:12 -04:00
Michael Kirk
157b5ef15d Bump build
// FREEBIE
2016-11-04 15:01:14 -04:00
Michael Kirk
c6a2fbff23 Tapping corrupted message opens "session reset" activity
This action was previously hidden under a secret longpress gesture in
the fingerprint view controller.

Ideally we'd never receive corrupted messages, but at the point we do,
our sessions are out of whack, and the only recovery option is to reset.
Let's help our users do that.

* Resetting session sends END_SESSION message

  Otherwise the remote side wouldn't know we reset the session and will
  send us a message on the old ratchet.

* Don't reset their identity key when resetting sender ratchet.

* Updated translations

// FREEBIE
2016-11-04 14:57:37 -04:00
Michael Kirk
bd370f1de4 Fix cropped Chinese/Japanese messages
The earlier fix for the broken ios10 emoji font ended up breaking
messages for some users with a tall font.

Here we have a lighter touch - ensuring we don't touch messages that
don't use emoji.

Also, introduce a different approach to the fix, rather than trying to
compute the bounding rect of an appropriately attributed string, just
add an extra bit of height per line.

This approach isn't ideal for long messages with only one emoji line in
them, but the previous approach was incompatible with Chinese messages
that also contain emoji. See the new
`MesssagesBubblesSizeCalculatorTest.swift` for test cases considered.

// FREEBIE
2016-11-03 16:22:33 -04:00
Michael Kirk
62f9606bf5 Merge branch 'mkirk/fix-registration-without-background-modes#1329'
// FREEBIE
2016-11-03 16:19:21 -04:00
Michael Kirk
78d9c97d70 Bump build and properly set version.
// FREEBIE
2016-11-03 16:13:50 -04:00
Michael Kirk
1dd06a5e6c Fix registration flow / Keep push tokens in sync
* Separate registering an account from registering for push notifications
  * Allows us to complete registration without prompting user for
    notification settings.

UX Changes
----------
* Automatically keep push tokens in sync on startup.
  Push tokens *can* change, though they rarely do. It happens more often
  for people switching between appstore/beta builds.

  fixes #1174

* Show alert with registration failure
  * add secret 8-tap debug log gesture to registration flow

* Move registration to separate flow
  * don't see flash of inbox when first launching

* show useful error messages when given wrong code / no code

* remove background fetch
  We werent using it, but only relying on a side effect of it which is
  no longer necessary.

Code Changes
------------

* More registration logging.

* Install PromiseKit with carthage

  Our dependencies are not yet framework compatible, so we can't use
  cocoapods.

* Merge preferences util "category" into superclass.

  The immediate reason for this is Swift interop was assuming optional
  types were not optional, and exploding when a value was nil.

  This is clearer anyway, since we were treating it like a subclass, and
  it was the only thing using the class anyway.

* auto-genstrings now searches *.swift (and *.h, which was previously
  broken) for translateable strings.

// FREEBIE
2016-11-03 16:13:49 -04:00
Michael Kirk
f98e57e164 WIP: Fix hanging registration when background modes disabled
fixes #1329

We must register notification settings earlier to be sure we'll be able
to get the users push tokens.

We were previously relying on a quirk of background fetch, a feature
which we don't *actually* use, wherein it's possible to get push tokens
for a user without first prompting them for their notification
settings. More on this from UIApplication.h:

    // Calling this will result in either application:didRegisterForRemoteNotificationsWithDeviceToken: or application:didFailToRegisterForRemoteNotificationsWithError: to be called on the application delegate.
    // ---> Note: these callbacks will be made only if the application has successfully registered for user notifications with registerUserNotificationSettings:, or if it is enabled for Background App Refresh.
    - (void)registerForRemoteNotifications NS_AVAILABLE_IOS(8_0);

In the previous implementation, if a user had disabled background
notifications (e.g.  in order to save battery), we were waiting for push
tokens that would never come.

However, this simple "fix" introduces a UX problem - now we prompt for
an alert in the middle of our registration flow.

// FREEBIE
2016-11-03 16:12:28 -04:00
Michael Kirk
bae050480a Debug logging around call init crash.
// FREEBIE
2016-11-03 16:12:27 -04:00
Michael Kirk
4fc5260244 Don't prompt for feedback if user hasn't completed registration
// FREEBIE
2016-11-03 16:12:27 -04:00
Michael Kirk
ac996db258 Merge pull request #1407 from mdouglass/fix-issue-1270
Unifies bubble sizes for media bubbles

// FREEBIE
2016-11-03 15:38:27 -04:00
Michael Kirk
cc8c8d61b4 [SSK] Update to prevent session corruption
// FREEBIE
2016-11-03 14:52:14 -04:00