Commit Graph

80 Commits

Author SHA1 Message Date
Harry
58e801d2e6
Clean up ThreadUtil+SignalUI 2024-06-11 15:43:15 -07:00
Adam Mork
70d2a68186
[Payments] Add mobilecoin/sentz enclave measurements for v6.0.0
Signed-off-by: the-real-adammork <adammork@gmail.com>
2024-05-30 16:44:00 -05:00
Max Radermacher
dd42e10e88
Smoosh together various places that fetch profiles 2024-04-23 15:22:37 -05:00
Ehren Kret
f41749cc9d fix warnings in SignalUI 2024-04-20 14:17:44 -05:00
Max Radermacher
a241f40621
Fix a few build warnings 2024-04-17 19:11:13 -05:00
Max Radermacher
972bb6d37a
Tweak some info and warning lines 2024-04-16 18:10:49 -05:00
Jordan Rose
b0de59f2e2 Remove required from every init that is not dynamically dispatched
This included:
- Removing unavailable inits wholesale if no longer `required`
- Marking a few classes `final` so they could continue using
  `Self(...)` rather than `OWSWhatever(...)`
2024-04-01 15:27:20 -07:00
Harry
4059335aac
Use PreparedOutgoingMessage for all transient message enqueuing 2024-03-28 10:36:24 -07:00
Harry
89f9582f66
Use new PreparedOutgoingMessage for standard ThreadUtil message enqueueing 2024-03-28 09:51:04 -07:00
Max Radermacher
0928223d57
Colocate SignalUI tests with the files they test 2024-03-28 02:25:56 -05:00
Jordan Rose
2727a70b90 Make AtomicValue's lock-sharing explicit
Also:
- Remove AtomicUInt's @objc, it's no longer used from ObjC
- Remove Codable conformances, they would implicitly use shared locks
  and weren't used in practice
2024-03-27 10:57:32 -07:00
Max Radermacher
8910fc4d5b
Move around files in SignalUI/ and the share ext 2024-03-25 14:22:28 -05:00
Max Radermacher
42c704a4e3
Remove some debug/verbose lines 2024-03-19 19:24:54 -05:00
Ehren Kret
d4e17730f3 remove import SignalMessaging statements 2024-03-12 03:35:34 -05:00
Ehren Kret
9c7078b3f8 migrate OWSContactsManager to swift
as the last remaining objective-c file, this removed direct dependency
from the SignalMessaging framework headers on SignalServiceKit and
thus required adding lots of import statements
2024-03-09 10:45:55 -06:00
Max Radermacher
978c15eaca
Use 4-part version numbers everywhere 2024-02-13 11:49:14 -06:00
Pete Walters
0386e10726
Update mobilecoin SDK to v6.0.0
Co-authored-by: Adam Mork <adammork@gmail.com>
2024-01-30 12:32:21 -06:00
Max Radermacher
d958e90a58
Clean up ProfileFetcherJob error handling 2024-01-24 17:26:32 -06:00
Max Radermacher
6c1c4b931d
Clean up DecryptedProfile 2024-01-18 16:01:48 -06:00
Harry
0c53ff88fa
Rename TSOutgoingMessage.isFromLinkedDevice->wasNotCreatedLocally 2023-12-15 09:36:46 -08:00
Max Radermacher
ba4034f5a7
Remove SSKJobQueues 2023-12-11 14:22:22 -06:00
Harry
aa0e250cb7
[Death to TSAccountManager, long live TSAccountManager][9] Migrate usages of old TSAccountManager to new 2023-10-05 08:56:08 -07:00
Harry
1bb84295e6
[Death to TSAccountManager, long live TSAccountManager][1] Light refactoring to remove useless methods and such 2023-09-21 08:52:04 -07:00
Max Radermacher
434317cb02
Swiftify & protocolize OWSIdentityManager 2023-08-29 10:28:11 -05:00
Max Radermacher
c57376a269
Remove unused/obsolete payments code 2023-08-24 18:05:38 -05:00
Max Radermacher
b260615a10
[ServiceId] Update payments code 2023-08-24 18:01:45 -05:00
Harry
2ac759408a
[MOB] Payment messages in chat 2023-08-24 13:55:39 -07:00
Max Radermacher
b60e7c24f1
[ServiceId] Update ProfileFetcherJob 2023-08-02 17:54:32 -05:00
Harry
501ee85adf
Refresh SVR2 auth credentials every new app version 2023-07-31 18:02:07 -07:00
Igor Solomennikov
0686b39547 Add necessary imports to Swift files.
Those would be required for future PRs.
2023-06-13 14:46:12 -07:00
Pete Walters
be013d8d37
Update MobileCoin SDK to v5.0.0
Co-authored-by: the-real-adammork <adammork@gmail.com>
2023-06-12 12:52:23 -05:00
Max Radermacher
ca3b018734
Add & use DisappearingMessagesConfigurationStore 2023-06-05 11:00:38 -05:00
Igor Solomennikov
c054f3de91
Remove unnecessary "@objc" in SignalUI. 2023-05-16 16:39:19 -07:00
Evan Hahn
3804ed76a5
Move app version off Dependencies and NSObject
This change should have no user impact.

`appVersion` used to be a property of `Dependencies` and `NSObject`. It
just deferred to `AppVersion.shared()`.

This commit removes those properties and relies on `AppVersion.shared`
instead. Also, `AppVersion.shared` is now a getter, not a function.
2023-04-05 13:29:49 -07:00
Evan Hahn
b8bba6272d
Remove unused payment processor method
This change should have no user impact.

`buildBadDataError` was never used. It looks like the last usage was
removed in 3ddeb4fae0.
2023-03-13 09:17:01 -07:00
Max Radermacher
898fd2c4d5
Clean up queue names 2023-02-27 14:16:09 -08:00
Adam Mork
cf00420c35
[Payments] Increase perceived payment speed
* txOutStatus and less frequent balance check

* clearCurrentPaymentBalance

* fix dispatch queue compile issue

* revert pods change

---------

Co-authored-by: Phil Larson <phil.larson@icloud.com>
2023-02-15 07:43:43 -08:00
Harry
003cc19e62
Update SignalCoreKit. Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params
* Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params

* Update SignalCoreKit
2023-02-07 16:14:39 -08:00
Adam Mork
b9276ef47f
Add new MobileCoin testnet enclave measurements 2023-02-02 12:25:44 -08:00
Adam Mork
660a90c3f1
Update to MobileCoin 4.0.0 (prerelease) 2023-02-02 10:50:12 -06:00
Evan Hahn
60ace0a8dc
Dismissing spinner shouldn't require callback
This is a minor change that should have no user impact.

We had a bunch of calls like this:

    modalActivityIndicator.dismiss {}

This makes the parameter optional, so you can do this:

    modalActivityIndicator.dismiss()
2023-01-20 18:11:55 -06:00
Adam Mork
8a27d9f373
Specify both of the the Signal consensus nodes in the network config, this allows for client side load balancing, and rotation on failure. (#5619)
Specify both of the the Signal consensus nodes in the network config this allows for client side load balancing, and rotation on failure.
2023-01-13 17:48:09 -08:00
Adam Mork
05e82308df
add testnet enclave measurements for v3.0.0 (#5442)
Update enclave measurements to v3.0.0 for testnet (11/08/2022 build).
2022-12-21 14:06:38 -08:00
Max Radermacher
3a2b5a37bf Fix SwiftLint violations 2022-11-29 14:47:23 -08:00
Max Radermacher
0fb57a74ae
Fix various bugs in OWSHttpHeaders
First, `OWSHttpHeaders(httpHeaders:)` completely ignored its argument.
This doesn’t actually seem to have led to any bugs in practice; one time
the caller appears to have worked around the bug by adding the headers
again, and another time the caller relied on `allHTTPHeaderFields`
ignoring unrelated values.

Second, `URLRequest` has both `addValue` and `setValue` methods for its
headers. The former will construct a comma-separated list if the header
is already set, and the latter will replace it if it’s already set. (If
the header hasn’t been set, the two are equivalent, which is why call
sites weren’t broken even though they used the wrong method.) This was
broken only in multi-part uploads, but it was broken for "User-Agent"
and "Accept-Language", both of which are non-critical.

Third, `URLRequest`’s `allHTTPHeaderFields` doesn’t behave the way you
might expect. There’s a unit test which demonstrates some of the weird
behaviors, but any fields that aren’t present in the assigned value
aren’t touched. It seems as though most code was written as if calling
this method would fully replace *all* the HTTP headers. (The
`replace(…)` and `removeAllHeaders` methods have been removed because
they didn’t do what you’d think, and they weren’t necessary.)

Also:
* Remove Obj-C support from OWSHttpHeaders
* Move & simplify tests for HTTP Retry-After header
* Remove unused `asConnectionFailureError` method
2022-11-22 11:43:55 -08:00
Sasha Weiss
242dfd2bce
Add all JobQueues to environment, via a wrapper
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.
2022-11-09 14:08:44 -06:00
Adam Mork
06f5a09a22
[Payments] MobileCoin enclave measurements update for v3.0.0 (#5378)
added mainnet 3.0.0 MobileCoin enclave measurements, and updated flow of attestation measurements to attestations so hardening advisories match the measurements that need them.
2022-11-07 15:52:36 -08:00
Adam Mork
2dd98c37b3
[Payments] Show alert if client is outdated
Co-authored-by: Phil Larson <phil.larson@icloud.com>
Co-authored-by: Max Radermacher <max@signal.org>
2022-10-25 15:43:43 -07:00
Max Radermacher
ab55cf3929 Import SignalMessaging where it’s needed
The next commit removes a file that, through assorted Swift/Obj-C bridge
magic, resulted in SignalMessaging being available to all these files.
2022-10-24 10:19:06 -07:00
Evan Hahn
370ff654e7
Change license to AGPL
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
2022-10-13 08:25:37 -05:00