* Go to chat list view after registration
* sync system contacts during registration
* Use explicit local credentials for storage service operations during registration
* fix tests
* Quick hack to get through double pin confirmation
* Finishing touches
* lint
* fix build
* reload phone number discoverability after storage service sync
* fix tests again
* Take chat auth on account and contact record initializers
* Change around branches for clarity in OWSUserProfile
* pr comments
* Split ChatServiceAuth into the same and AuthedAccount
* fix tests
* merge woes
This change should have no user impact.
I noticed that a few of these methods weren't used. Also, one of the
formatters was not used externally, so I removed it from the `.h`.
* payment lock
* add 30 day timeout to showing the payment lock suggestion
* fix linting
* update comment
* Payment Lock: Fix project file & submodules (#4878)
* revert ringrtc changes
* revert pods changes
* fix project file
* PR Comment suggestions and fixes
* PR suggestions
* revert screen lock to previous implementation
* rename OWSPaymentLock to OWSPaymentsLock (missing plural s), remove
super-class dependency. Make OWSPaymentsLock more "swifty".
* revert changes to call-site for OWSScreenLock
* update call-sites for OWSPaymentsLock
* forgot to add PaymentOnboarding class and localization comment improvements
* change function call-site
* Remove OWSLocalAuthentication from project
* remove OWSLocalAuth from project file
* make edge-case default more secure if storage not ready
* fix project file
* lint fix
* fix linting errors
* Revert compact format style for OWSLocalizedString
* fix localization call-sites to use literals, update localization file after autogen
* Add new Payments Lock Prompt view to be shown after activating payments. Factor out the BiometryType "current biometry" into its own class with helpers to easily getting the devices current setup.
* fix linting issues, sort project file, and autogen localizations
* require payments lock to look at the recovery phrase
* fix linting issue
* fix missing localizations (caused by dynamic creation in previous commit)
* use Pods commit from signal/main
* re-run linter on latest commits
* new header comments for new branch files
* update submodule commits
* Use existing secondsInDay constant kDayInterval, use weak self guard statement instead of optional self in escaping closure.
* Revert submodule changes
* Remove duplicate copyright headers
* Revert copyright header changes
* Restore some missing translations
* Add localization for unknown LocalAuthentication error/state.
* remove Pods changes
* linting
* use submodule commits from main
* subclass the old Objc OWSViewController super-class, should fix CICD
* change capitalized Passcode to lower-case in non-title situation.
* remove early exit guard from biometryType computed function. Reason being that the type can be gathered from a policy that evaluates to false. In a case where the user has a FaceID phone but its disabled, the messaging would be incorrect. removing the early exit evaluates the biometryType which apple provides even if the policy returns false.
* inline snooze date
* inject write transaction to some convenience methods to reduce database overhead when multiple calls need to happen at the same time.
* make combined set and snooze function, update combined call-site
* rename long function
* use false instead of sender.on to avoid sneaky view issues
* add tryToUnlockPromise function to clean up call sites
* change superclass, fix Promise statement
* call super class function
* remove objc
* add unlock failed action sheet helper class and put at all relevant call-sites, still need to test though.
* add unlock failed action sheet helper class and put at all relevant call-sites, still need to test though. linting
* project file changes for new file
* re-render payments lock toggle after failure to change setting.
re-render payments lock toggle after failure to change setting.
* move around action sheet call-site to account for an action sheet already being presented. remove unecc. return
* fix merge conflicts, linting
* re-gen strings file
---------
Co-authored-by: Max Radermacher <max@signal.org>
* Allow using a transaction for checking APNS token
* Add APNSRotationStore
* add APNSRotationStoreTest
* Rotate APNS tokens in SyncPushTokensJob
* Mark NSE as having processed messages for token rotation
* Check for APNS token rotations after flushing incoming message queue
* pr comments
* Simplify APNS rotation conditions: we mark APNS as working when getting a push in either the NSE or the main app, and rotate if we missed a message since then.
* Mark APNS tokens as working if we ever get a push. Don't rotate known-good tokens.
* Added logging
* add remote flags to control behavior
* pr comments
* fix bad merge
* invert kill switch
* PR nit comments
* Avoid write transactions on the SyncPushTokensJob hot path
* Initial PR feedback, more to come
* Change of strategy: rotate if we have new messages to process on app startup
* PR comments
* use null for calltype column on incoming message rows
[Some users report][0] that data isn't being properly deleted. This adds
some additional logging to `OWSOrphanDataCleaner` (and converts some of
it to Swift while we're at it) which may help us fix the bug.
There are some small behavior changes here, but they should be minor:
- We now only open _one_ transaction when checking whether we should
do a cleanup, instead of two.
- Some log messages were changed
- We now handle the case where the "last cleaned date" is unexpectedly
missing
[0]: https://github.com/signalapp/Signal-iOS/issues/4916#issuecomment-1248234244
We've been presenting all safety number mismatches as "someone joined
the call you were already in", but sometimes they were in the call
first. In that case, we should use a different message.
While here, make these messages a little more concise so we can fit in
an explicit "Tap to view", to encourage people to come back to the app
and decide whether they want to stay in the call.
Currently, only some `JobQueue` types are initialized during startup
(as part of `Environment`, or `SSKEnvironment`). Initialization is
required, however, for a `JobQueue` type to restart any latent jobs.
That means that, for example, a durable `SendGiftBadge` job that failed,
and should be reattempted at a later date, will not in fact be restarted
since no `SendGiftBadgeJobQueue` will be initialized at launch.
This change adds `SSKJobQueues` and `SignalMessagingJobQueues` types,
which are intended to be singletons that hold within them a singleton
job queue for each of our `JobQueue` types. These wrappers are added to
`SSKEnvironment` and `Environment` (from SignalMessaging) respectively,
ensuring that all the `JobQueue`s they contain are initialized as part
of environment setup. The wrappers also avoid the need to add a new
property to the (already large) environment types for each new future
`JobQueue`.
This change also updates all existing call sites that accessed a
`JobQueue` from an environment object, to direct that access now through
the wrapper type.
* Remove "@objc" attribution in places related to ConversationInputToolbar where that is no longer necessary.
* Swiftify LinkPreviewState protocol.
* Convert ConversationScrollButton to Swift.
This adds a table of "cancelled group rings", to handle out-of-order
delivery between a cancellation and a ring. (This can happen when the
cancellation comes from a linked device rather than the original
ringer, though it's very unlikely.) Thirty-minute-old cancellations
are cleared lazily.
This also adds a new IncomingCallControls to replace the usual
CallControls in a GroupCallViewController.
And finally, there's a lot of code that was 1:1-call-specific that now
handles group calls as well, either by being more general or by
checking which kind of call we have.
* Refactor PhotoGridItem to be more compile-time safe
* Add accessibilityLabel to items in PhotoLibrary
* run auto genstrings
* fix build issue
Co-authored-by: Meher Kasam <meheranandk@gmail.com>
Change license to AGPL
This commit:
- Updates the `LICENSE` file
- Start every file with something like:
// Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
---
First, I removed existing license headers with this Ruby 3.1.2 script:
require 'set'
EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']
same = 0
different = 0
all_files = `git ls-files`.lines.map { |line| line.strip }
all_files.each do |relative_path|
if relative_path == 'Pods'
next
end
unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
next
end
path = File.expand_path(relative_path)
contents = File.read(path)
new_contents = contents.sub(/\/\/\n\/\/ Copyright .*\n\/\/\n\n/, '')
if contents == new_contents
same += 1
else
different += 1
end
File.write(path, new_contents)
end
puts "updated #{different} file(s), left #{same} untouched"
I'm sure this script could be improved, but it worked well enough.
Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.
Then I fixed some stragglers and updated the precommit script.
See [a similar change in the Desktop app][0].
[0]: 8bfaf598af
For certain kinds of notifications, we attach "intents" to let the
system know who's contacting us (for use in, say, share sheet
suggestions; controlled by Settings > Chats > Share Contacts with
iOS). Previously we only provided "rich" intents on iOS 15 and a
minimal implementation for iOS 13, but even if iOS 13 won't do as much
with the information we can be more consistent.
The block-based API returns a token that needs to be explicitly
unregistered, *and* the block should not capture 'self' strongly.
The fixes in this PR come in three flavors:
1. Switch to the selector-based API, sometimes taking advantage of
the fact that extra arguments to an Objective-C method can be
safely discarded (because they are passed at +0).
2. Save the observer token and unregister in deinit.
3. Comment why it's safe to leave the observer registered forever
in this particular case.
* Little fix for context menu
* Add 'My Stories' section to stories tab
* Add new story thread types
* Show stories in conversation picker
* Support for sending stories
* Update story list when sending stories
* Add basic 'My Stories' view controller
* Initial stories settings screens
* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class
* Require an explicit read transaction to initialize an outgoing message
* Fix linting
* Allow enabling group story from internal settings
* Fix tests
* PR Feedback