This will be the interface used for storing IDs of group calls in the
future; for now there should be no functionality change, except if
there's an address mentioned with no associated thread. Previously
that thread would be created if needed; now the call action will fail.
This seems reasonable given that threads only go away if the user
explicitly deletes them.
While here, we don't need to save both the UUID and phone number of a
user's address; the UUID always wins anyway. Only worry about phone
numbers if there's no UUID.
Previously, archived groups didn't show up in the "Add to Another Group"
view. Now, they do!
This also orders groups entirely by recency.
This view used `ThreadViewHelper`, which (1) omitted archived groups
(2) had a bunch of dormant database observation code. I removed this
class and replaced it with some inline code that fetches groups.
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)
* 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
- 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.
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.
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)
* 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
- Revert "More flexible selection styling in CVTextLabel"
(commit e1317d814c)
- Revert "Show the MemberActionSheet for tapped names in group system messages"
(commit 48bc3c07d0)
As of 86b8eb08b8, the database initialization no longer has
asychronous components. The current code returns an already-resolved
promise in all situations, so remove the asynchronous infra entirely.
I added these tests in da322d3bf9, but we
decided that they're not worth it.
Also, it seems I forgot to add them to the project! So they were never
run anyway, outside of the times I ran them while developing.
* Split OWSSignalService into a swift protocol and implementation, migrated from objc
* Put OWSSignalService under SSKEnvironment and use mock in mock environment
* Rename from basename + impl to protocol + basename
* extend mock functionality a bit
* pr feedback
* Improve phone number parsing.
Previously, if you entered a phone number
including a country code during registration you'd
have a duplicate country code. Signal on Android
did not have this bug because it uses a different
API inlibphonenumber. This diff changes iPhone to
use the same API, which is smart enough to remove
the country code from the phone number the user
entered if needed.
Co-authored-by: Evan Hahn <evanhahn@signal.org>
The non-lazy map and filter always make a new array or dictionary,
which is often consumed immediately into a Set. Using `lazy` avoids
that intermediate allocation, as well as the need to loop over the
array or dictionary a second time.
This is a micro-optimization, but several of these accessors are
accessed fairly frequently, so we might as well make them faster.
* update MobileCoin to release v1.2.x, add new 1.2.x testNet enclave
values, migrate deprecated function calls to new alternatives.
* Add new top-level error to convertMCError
use staging for now
* Add mainnet enclave values, revert production/staging environment change from testing. Add comment about libmobilecoin static libraries needing to be built on signal build machine.
* add 2.x series enclave measurements
* Add intel hardening advisory for the new 2.x series of enclaves. This hardening advisory being added has no effect on the 1.2.x enclaves, but is required for the 2.x enclaves.
* Remove commented enclave measurements, change Logger.error to Logger.warn (some failed requests is expected for long-living connections), Add in new testNet enclave measurements
* Update to LibMobileCoin v1.2.2
Co-authored-by: Nora Trapp <nora@signal.org>
Make `encodeE164s` a static method since it doesn’t need to access any
details from the operation instance.
Also move the test to SignalServiceKitTests.
To improve message reliability, we're adding an urgency flag to outgoing
messages. For example, outgoing calls are urgent, but delivery receipts
are not. [Android][] and [Desktop][] have already done this work.
At a high level, I added an `isUrgent` property to `TSOutgoingMessage`s.
It defaults to `true`. Some subclasses, like
`OWSReceiptsForSenderMessage`, override it to return `false`.
Builds off of a few other commits (not necessary to understand this
commit, but might be useful for posterity):
- e858a0d916
- 8c6d2ebe8c
- 402b117221
- 2ba0cd764d
- 266a4663e9
- 8e5009bbf7
[Android]: dc04c8ed98
[Desktop]: 06190b1434
...so we can enable and disable the ring button live. And do so
preserving the user's preferences in case they turn off ringing, then
someone joins the group and it goes over the limit, then someone
leaves the group and it's back under.