Commit Graph

52 Commits

Author SHA1 Message Date
Max Radermacher
daca0d94ec
Migrate blocked groups to a dedicated table 2025-01-21 10:54:28 -06:00
Max Radermacher
77a9296f60
Add & use CompletionSerializer 2024-12-19 13:11:00 -06:00
Sasha Weiss
2000b82c0b
One KeyValueStore to rule them all 2024-11-15 18:47:54 -06:00
Max Radermacher
788e87f15b
Decode a bunch of JSON constants 2024-10-28 21:34:41 -05:00
Ehren Kret
de32c7799d remove NSObject and Dependencies extension computed vars for SignalServiceKit 2024-10-11 23:12:59 -05:00
Max Radermacher
b6b3a78f60
Add GRDB migrations for call links 2024-10-09 14:03:38 -05:00
Harry
ce5689dcb3
Remove MockDB in favor of InMemoryDB 2024-10-07 19:06:08 -07:00
Ehren Kret
5ea36cd91b enable internal imports by default 2024-09-29 20:03:17 -05:00
Harry Sanabria
044f277a28 Pass AppReadiness instance to a ton of classes that need to retain it as an instance var 2024-09-27 15:03:52 -07:00
Max Radermacher
af03b70346
Migrate blocked recipients to dedicated table 2024-08-21 18:03:22 -05:00
Sasha Weiss
78ae578aa0
Use the withDefaults pattern for TSOutgoingMessageBuilder 2024-08-06 10:22:07 -07:00
Adam Sharp
34a8cf2bda
Rename owsAssert to owsPrecondition 2024-07-09 10:42:56 -04:00
Adam Sharp
18a0d40d62 Fix various compiler errors in tests under Xcode 16 2024-07-03 11:29:37 -04:00
Harry
e168704676
Add originalAttachmentIdForQuotedReply column to Attachment table 2024-06-12 15:05:49 -07:00
Sasha Weiss
2c5f47e95e
Consolidate similar InteractionFinder methods 2024-06-04 14:55:36 -07:00
Harry
0d85470991
Create V2 Attachment table (+ friends) migration 2024-05-23 09:12:22 -07:00
Sasha Weiss
6ff76dd7e6
Do away with some ObjC test infra 2024-05-06 09:57:21 -07:00
Sasha Weiss
a25868491f
Make defaults in TSIncomingMessageBuilder explicit and complete 2024-05-02 15:56:02 -07:00
Ehren Kret
110a880d6c remove and disallow warnings in SignalServiceKitTests target 2024-04-21 09:55:30 -05:00
Max Radermacher
20783085bb
Replace SAMKeychain with direct keychain access 2024-04-05 21:50:00 -05:00
Max Radermacher
0a24b7b357
Clean up recipient searches 2024-03-07 11:57:45 -06:00
Max Radermacher
422c0f03ba
Don’t migrate kLocalProfileUniqueId user profiles 2024-02-16 16:36:07 -06:00
Max Radermacher
cebe9b0f40
Remove redundant phone numbers from database 2024-02-14 19:08:40 -06:00
Max Radermacher
ded1d2f5b8
Assume everybody is PNI-capable 2024-02-13 14:53:39 -06:00
Max Radermacher
d51102c461
Delete expired messages in smaller batches 2023-12-04 11:40:11 -06:00
Sasha Weiss
43256c85e8
Add extension for sqliteRowId 2023-10-13 15:17:54 -07: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
Sasha Weiss
c39af86c22
Catch retained transactions in MockDB 2023-08-30 12:39:26 -07:00
Max Radermacher
30adac30ab
Reduce size of CDS write transactions 2023-08-18 12:27:15 -05:00
Max Radermacher
29472146a2
[ServiceId] Update outgoing receipts 2023-08-17 12:10:58 -05:00
Max Radermacher
ac14bc637e
[ServiceId] Update TSIncomingMessageBuilder 2023-08-02 17:40:56 -05:00
Max Radermacher
46f8d6cb56
[ServiceId] Update reactions 2023-08-02 17:14:52 -05:00
Max Radermacher
17a2fb4093
Rename ServiceId -> UntypedServiceId 2023-07-26 16:56:19 -05:00
Max Radermacher
b593cba603
Adopt randomForTesting/constantForTesting 2023-07-26 16:29:14 -05:00
Max Radermacher
5acabbe61f
Prepare interactions for modern recipient merging 2023-06-28 11:58:44 -05:00
Pete Walters
9b235845ed
Update how edits are expired & deleted 2023-06-02 16:15:46 -05:00
Pete Walters
f58b6947ce
Funnel read crashes into the recovery flow 2023-06-02 11:48:51 -05:00
Max Radermacher
28753eb98b Add & use ThreadReplyInfoStore 2023-05-31 11:34:43 -05:00
Sasha Weiss
f1063c1071
Migrate OWSDevice to SDSCodableModel 2023-04-13 14:00:46 -07:00
Sasha Weiss
c9fbc9a9ee
Migrate SSKJobRecord and subclasses to SDSCodableModel using factory init 2023-04-13 10:57:48 -07:00
Evan Hahn
2895b84ef1
Database recovery: REINDEX as a first step
*I recommend reviewing this with whitespace changes disabled.*
2023-04-05 15:21:16 -05:00
Max Radermacher
93d97da82b
Split “in progress” & “saved” voice message drafts 2023-03-08 15:31:56 -08:00
Harry
3d6225060d
Add RegistrationCoordinator
* Add ability to compute registration recovery password

* Add RegistrationCoordinator

* remove repeat nav controller that evan added

* Scaffolding for RegistrationCoodinator test

* Add first round of RegistrationCoordinator tests, some stuff I needed to get them working, and some fixes to RegistrationCoordinator itself I discovered thanks to the tests

* switch to owsFailBeta

* Add auth credential candidate flow tests, related fixes and additions to coordinator and friends

* Add tests for session based registration path and associated fixes

* PR comment nits
2023-02-14 08:50:24 -08:00
Harry
fc4ec188e8
Implement RegistrationSessionManager
* Add RegistrationSession object

* Add RegistrationSessionManager protocol

* Add skeleton RegistrationSessionManagerImpl - just kvstore persistence implemented

* Issue requests in RegistrationSessionManagerImpl

* let tests access the in memory kv store

* Add TSRequestOWSURLSessionMock. Rename OWSURLSessionMock

* Add DateProvider

* Take a dateProvider in RegistrationSessionManagerImpl

* Add tests for RegistrationSessionManager

* pre-emptively update timeout for tests. will remove once promise Scheduler code is merged

* PR comments

* Use Schedulers
2023-02-08 15:37:12 -08:00
Sasha Weiss
e5f1af6c2e
Support lookup-by-username 2023-02-08 10:16:57 -08:00
Evan Hahn
b95a1c4363
Make FullTextSearchFinder stateless
This change should have no user impact. I think this is a useful
cleanup.
2023-02-06 13:33:43 -06:00
Harry
6576349613
Migrate KeyBackupService to the Swift Way™️
* Put KeyBackupService in its own folder

* Put SDSKeyValueStore in its own directory

* Put SDSDatabaseStorage in its own directory

* Stop doing useless dispatches in SDSTransactable

* Add V2 DB classes

* Wrap SDSKeyValueStore in a protocol and factory

* Make TSConstantsProtocol public to take it as a param in other places

* Take explicit transactions and do single lookups in TSAccountManager registration state methods

* Take explicit transaction on OWS2FAManager

* Make KeyBackupService an instance that takes dependencies on init

* Protocolize KeyBackupService

* Put Dependencies+SSK in its own directory

* Add DependenciesBridge

* add ViewControllerContext

* used shared context in OnboardingController

* Don't check KeyBackupService in RemoteConfigManager; the one and only callsite already checks it separately

* All the random cleanup that needed to happen to get the app to build again.

* Add mock dbv2 classes

* Migrate existing KeyBackupServiceTests

* Namespace KBS shims

* DBV2 -> DB, after changing the min swiftlint type length to 2 chars

* add toy example

* Unwrap writes as reads

* pr comments

* pr comments 2: return of the nits

* final Pr comment
2023-02-02 09:42:05 -08:00
Evan Hahn
1ba45411ae
Enable a RingRTC field trial for all users, with kill switch
The successor to 389515b0fa.

This enables the "WebRTC-Network-UseNWPathMonitor" RingRTC field trial
for all users.

The hard part: adding a remote config kill switch. I added a bunch of
comments (and tests) to try to make the intention clear.
2023-02-01 16:20:16 -06: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
Evan Hahn
349681ff85
Attempt to recover corrupted databases
If a user's database is corrupted, we now try to fix it. I recommend
reviewing `DatabaseRecovery` to see how this works, and
`DatabaseRecoveryViewController` for the bulk of the UI.
2022-10-06 16:42:19 -05:00