Commit Graph

28988 Commits

Author SHA1 Message Date
Jordan Rose
a13799f1fe Pull CallUIAdapter up to CallService (from IndividualCallService)
This is preparation for putting group calls in CallKit as well, but
for now there's no functionality change here, just moving things
around.
2022-08-31 17:51:12 -07:00
Jordan Rose
c6095d140d Remove unused transaction parameter from CallService.terminate 2022-08-31 17:51:12 -07:00
Jordan Rose
e2376bac02 Prepare call notifications for group call rings
This mainly means passing around SignalCalls instead of
IndividualCalls, but while here it makes sense to be more explicit
about who the caller is.
2022-08-31 17:51:12 -07:00
Jordan Rose
f0ccdd9787 Move localId up from IndividualCall to SignalCall
Group calls don't normally have stable IDs, but we need an opaque ID
to represent a particular ring for CallKit or notifications.

The next commit will drop the localId on IndividualCall, but right now
it's still needed for presenting notifications.
2022-08-31 17:51:12 -07:00
Igor Solomennikov
a74c7e0885
Modify link preview panel UI used in stories viewer to allow its re-use.
• Extract the code into a new TextAttachmentView.LinkPreviewView class.
• Modify the code to accept wider variety of link preview data.
2022-08-31 16:53:38 -07:00
Evan Hahn
6737d09e22
ThreadViewModel no longer needs Objective-C interoperability
The last Objective-C reference to `ThreadViewModel` was removed in
793101f0e4, so we can remove a bunch of
`@objc` annotations.
2022-08-31 15:51:25 -07:00
Jim Gustafson
895a895ed5
Update to RingRTC v2.21.0 2022-08-31 14:57:11 -07:00
Max Radermacher
690a9f0a47
Show precommit.py diff in GitHub Action 2022-08-31 16:53:02 -05:00
Harry Sanabria
e2317b1ee7 "Bump build to 5.53.0.0." (nightly-08-31-2022) 2022-08-31 14:43:45 -07:00
Harry Sanabria
c035828006 Update translations 2022-08-31 14:41:22 -07:00
Nora Trapp
09598d2e7a Add remote flag for stories 2022-08-31 13:34:24 -07:00
Nora Trapp
0b86fc3d0a Fix regression that broke syncing of story viewed state 2022-08-31 13:00:54 -07:00
Harry
8206766336
Up timeout for SystemStoryManagerTest for slow CI 2022-08-31 12:27:09 -07:00
Evan Hahn
793101f0e4 Remove unused isThreadPinned method from ChatListViewController
This change should have no user impact.

Neither Xcode nor `git grep isThreadPinned` yield any relevant results
for this method. At a glance, it seems like its last usage was removed
in d57bc7fe26.
2022-08-31 12:06:49 -07:00
Nora Trapp
7fb88663f7 "Bump build to 5.52.0.6." (nightly-08-31-2022) 2022-08-31 04:01:03 -07:00
Evan Hahn
787a688b08 Rewrite PhoneNumber.tryParsePhoneNumber tests
This change should have no user impact.

This commit:

- Rewrites the tests in Swift
- Removes some redundant tests
- For North American phone numbers, uses `555-01XX` phone numbers
  (because "only 555-0100 through 555-0199 are now specifically reserved
  for fictional use; the other numbers have been reserved for actual
  assignment)
2022-08-31 00:36:06 +00:00
Evan Hahn
a6b395b11f Remove long-skipped phone number tests for Mexico
This change should have no user impact.

This removes a test that's been skipped since 2020 (see
5c976b0acd). I think this is okay given
that (1) we've skipped it for over 2 years (2) [we already have some
tests for Mexican phone numbers][0].

[0]: 895c1b7576/SignalServiceKit/tests/Contacts/PhoneNumberTest.swift (L10-L25)
2022-08-30 16:46:37 -07:00
Harry
b9dd5cb63c
Use final avatar for system author (onboarding story)
* Use final avatar for system author (onboarding story)

* remove onboarding story feature flag
2022-08-30 16:45:37 -07:00
Evan Hahn
27d5d0bbe4 Rewrite [Pastelog showFailureAlertWithMessage] in Swift
This change should have no user impact.

This was a pretty mechanical change.
2022-08-30 16:45:18 -07:00
Evan Hahn
c77a8022ed Hide blocked contacts from recipient pickers
Because we don't show blocked contacts in the recipient picker, we can
also remove some code that checks for blocked contacts.
2022-08-30 22:36:59 +00:00
Harry
7ee39eef63
Add SystemStoryManager
* Add OnboardingStoryManager

* mark onboarding story viewed

* Add tests and fix issues that came up from testing

* up test timeout for slower CI

* rename SystemStoryManager and put into dependency injecton container

* Use viewed state on StoryMessage itself. Have SystemStoryManager observe app lifecyle events to automatically manage the onboarding story

* use iOS assets which are now in s3

* todo cleanup

* increment timestamp for uniqueness

* pr comments

* change literal delimiter

* Add ChainedPromise utility, tests, and use in SystemStoryManager

* discretionarily observe app backgrounding in SystemStoryManager

* renaming from PR comments
2022-08-30 14:49:59 -07:00
Jordan Rose
8a83a04866 SenderKeyStore: Handle cross-process updates
Otherwise the main app can fail to find a new chain key even though
the NSE has already processed the appropriate SKDM, or vice versa.
2022-08-30 12:50:05 -07:00
Igor Solomennikov
b5ee24febe
Fix an issue causing incorrect line wraps in media editor's text overlays.
When calculating layout size of the photo overlay text max width is capped at
how wide UITextView was during editing, with the purpose of preserving wrapping
between editor (UITextView) and overlay (CATextLayer).
Previously though, UITextView was set to auto-shrink its width to content size,
which caused max width to not be not enough after changing the font to a bolder variant.
The fix is to pin UITextView's width to view margins so that all available width
is always used when measuring text overlay height.
2022-08-30 10:36:41 -07:00
Nora Trapp
f8f17e0770 "Bump build to 5.52.0.5." (nightly-08-30-2022) 2022-08-30 04:00:59 -07:00
Evan Hahn
2cadfc6524 Remove debug-only "send to self" debug logs action 2022-08-30 01:41:20 +00:00
Jordan Rose
4b9308f965 Handle video calls for INStartCallIntent
And use @available to avoid having to refer to classes and methods by
name instead of directly.

(And remove a very old, implemented TODO.)
2022-08-29 16:58:47 -07:00
Meher Kasam
44431f1920 Add "Speak Message" accessibility feature
If "Speak Selection" is enabled in your iOS settings, you can now choose
to speak the message.

See [#5417][0] for more details.

Co-Authored-By: Evan Hahn <evanhahn@signal.org>

[0]: https://github.com/signalapp/Signal-iOS/pull/5417
2022-08-29 16:25:04 -05:00
Jordan Rose
73fdd49d9a Use conversation state to decide if the user can ring a group at first
- Refactor the enum RingMode into an option set RingRestrictions
- Keep track of whether the call is empty in RingRestrictions rather
  than by directly inspecting peek info every time
- Set the initial callInProgress restriction by looking for unended
  calls in the database (the same thing used to show the "Join Call"
  button in the conversation view)
- Use the more-reliable callInProgress restriction everywhere we need
  to check if there's a call in progress
- If we think there's a call in progress but don't have peek info,
  wait until we get peek info to show status text in the call lobby

This provides a more orthogonal model for ring restrictions, which is
important for tracking "group too large" and "call in progress"
independently. Either can change but the state of the other still
determines how the UI should be updated.
2022-08-29 13:35:27 -07:00
Evan Hahn
c1eede8384 Rewrite [Pastelog collectLogsWithErrorString] in Swift
This change should have no direct user impact.
2022-08-29 20:16:37 +00:00
Max Radermacher
7e8bf3a6d4 Update KBS MrEnclave
TEST CASES:

Restoring from the old enclave:
- Register on the old code.
- Delete the app.
- Register with the new code, restoring with a PIN.

Migrating to the new enclave & restoring:
- Register on the old code.
- Update and run the new code.
- Delete the app.
- Register with the new code, restoring with a PIN.

Registering a new account:
- Register with the new code, setting up a brand new account.

Registration lock via the old enclave:
- Register on the old code (#1) & enable registration lock.
- Delete the app.
- Register on the new code (#2).
- Run change number (#2 -> #1) on the new code.
- Confirm both enclaves were checked.

Registration lock via the new enclave:
- Register on the new code (#1) & enable registration lock.
- Delete the app.
- Register on the new code (#2).
- Run change number (#2 -> #1) on the new code.
- Confirm only the new enclave was checked.
2022-08-29 09:12:35 -07:00
Nora Trapp
8bd91e6571 "Bump build to 5.52.0.4." (nightly-08-29-2022) 2022-08-29 04:00:56 -07:00
Evan Hahn
4fc5d75793 Update libPhoneNumber-iOS
This updates our libPhoneNumber dependency. See [the libPhoneNumber-iOS
commit][0].

According to [the upstream libphonenumber release notes][1], they
updated the formatting for +49 numbers. That caused a test to break, so
I updated it (and tested a few additional dialing codes).

[0]: 8b6f552682
[1]: 90503ecef3/release_notes.txt (L21)
2022-08-28 15:31:06 +00:00
Nora Trapp
333d9e4a8e "Bump build to 5.52.0.3." (nightly-08-27-2022) 2022-08-27 04:00:49 -07:00
Igor Solomennikov
981382ab65
Add explicit public initializer for TextAttachment.Background.Gradient struct.
This would allow initializing TextAttachment.Background.Gradient outside
of SignalServiceKit module.
2022-08-26 20:58:30 -07:00
Igor Solomennikov
6c1ed8d0dd
GradientView API improvement.
Allow to set just the gradient colors, without locations, relying on CAGradientLayer's
uniform color distribution logic.

Also update all the uses of GradientView to only specify colors because all the
places were using just two locations: 0 and 1.
2022-08-26 20:58:04 -07:00
Max Radermacher
1e056bfe71 Remove debug code to prepopulate change number 2022-08-26 14:43:09 -07:00
Max Radermacher
74c0bd93a7 Properly specify isComplete on contact syncs 2022-08-26 14:42:57 -07:00
Max Radermacher
fdc8633ab0 Remove ConversationConfigurationSyncOperation
It’s unused (except in debug code) since 8c0196077f.
2022-08-26 14:42:57 -07:00
Sasha Weiss
569cdb2aad
Durable jobs for leaving groups 2022-08-26 13:13:23 -07:00
Jordan Rose
1ba6bac2a5 Group call header: properly show "Ringing Albert, Bess, and Cillian"
This message is supposed to stay up until someone joins the call, but
it was getting dismissed just by the ringer *being* on the call.
2022-08-26 12:18:19 -07:00
Evan Hahn
5a0f836f0d Use "timestamp" instead of "timeStamp"
This change should have no user impact.

We use "timestamp", all lowercase, in most of the codebase. This makes
it consistent.
2022-08-26 14:17:12 -05:00
Harry
41211e0102
Add system author for Story messages
* make StoryMessage author an enum and handle at all usage sites

* add system story case to story context; don't show replies for system stories

* [tentative] add system avatar image

* clean up context creation and other odds and ends

* fix merge conflicts

* pre-PR cleanup

* add avatar asset TODO

* pr comments

* remove StoryAuthor enum, pass around author UUID instead with extension for checking if it is the signal system author uuid

* pr comments
2022-08-26 11:46:48 -07:00
Max Radermacher
4715a47f2e "Bump build to 5.52.0.2." (nightly-08-26-2022) 2022-08-26 11:44:50 -07:00
Max Radermacher
6955b6f53a Revert tapping names in group system messages
- Revert "More flexible selection styling in CVTextLabel"
  (commit e1317d814c)

- Revert "Show the MemberActionSheet for tapped names in group system messages"
  (commit 48bc3c07d0)
2022-08-26 11:43:58 -07:00
Evan Hahn
107b462fbe Close keyboard before dismissing gift badge, fixing bug
This dismisses the keyboard before you send a gift badge. I think this
is slightly better UX, but it also fixes a bug where the chat header
would be untappable after sending a gift badge.
2022-08-26 08:59:32 -05:00
Nora Trapp
b3a2b4ee34 "Bump build to 5.52.0.1." (nightly-08-26-2022) 2022-08-26 04:00:47 -07:00
Harry
8ab9505d75
Ignore failures to clean up dotfiles in logs directory on simulators 2022-08-25 16:24:19 -07:00
Sasha Weiss
11e2729c49
Auto-leave groups when added by a blocked contact 2022-08-25 16:20:15 -07:00
Sasha Weiss
e1317d814c
More flexible selection styling in CVTextLabel 2022-08-25 15:33:28 -07:00
Max Radermacher
6291280ee8 Update release notes 2022-08-25 15:22:11 -07:00