Commit Graph

48 Commits

Author SHA1 Message Date
Sasha Weiss
3ffcc47a66
Scaffold for Backup integration tests 2024-05-17 13:59:49 -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
Max Radermacher
456f2037ee
Stop putting kLocalProfileUniqueId in addresses 2024-04-23 13:58:27 -05:00
Sasha Weiss
d8627324fa
Require a V2 group model for group creation 2024-04-19 15:37:45 -07:00
Max Radermacher
73ad055674
Remove redundant phone numbers from OWSUserProfile 2024-04-12 22:22:49 -05:00
Pete Walters
2c6cfd7f32
Clean up uses of AuthedAccount in profiles 2024-04-11 11:11:43 -05:00
Max Radermacher
5e6ce4e388
Add & use PhoneNumberVisibilityFetcher 2024-02-14 19:06:59 -06:00
Max Radermacher
9d36e630dd
Add phone number sharing/discoverability fields 2024-02-14 18:45:46 -06:00
Max Radermacher
0e3c5a510c
Remove phone numbers from most database records 2024-02-02 17:31:52 -06:00
Max Radermacher
0cf9c659aa
Protocolize markAsRegistered/markAsUnregistered 2024-02-01 11:14:45 -06:00
Max Radermacher
d24c370cb1
Convert OWSUserProfile to SDSCodableModel 2024-01-24 17:14:10 -06:00
Max Radermacher
0233059f44
Add DB-conforming InMemoryDB type 2023-10-31 00:54:32 -05:00
Max Radermacher
fd9c5e8c64
Make isPrimaryDevice available to contact merges 2023-10-23 13:27:25 -05: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
Max Radermacher
f3e21416e1
Prepare MergedRecipient for PNI merges 2023-09-25 14:29:58 -05:00
Max Radermacher
0935c7e70e
Add PNI column to SignalRecipient 2023-09-06 17:31:16 -05:00
Max Radermacher
e985d795e7
Prune duplicate profiles when updating them 2023-08-28 12:59:36 -05:00
Sasha Weiss
840d0b7897
[ServiceId] TSGroupMember and friends 2023-08-21 11:30:18 -07:00
Max Radermacher
b103f3d939
[ServiceId] Update outgoing messages 2023-08-17 11:09:00 -05:00
Sasha Weiss
38077135df
[ServiceId] SignalAccount and friends 2023-08-16 16:33:14 -07:00
Max Radermacher
7452ea0442
[ServiceId] Update RecipientMerger 2023-08-03 16:59:29 -05:00
Max Radermacher
ac14bc637e
[ServiceId] Update TSIncomingMessageBuilder 2023-08-02 17:40:56 -05:00
Max Radermacher
07fc0b5706 [ServiceId] Update LocalIdentifiers 2023-08-01 14:36:06 -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
e631162b2b
Add logic to merge threads 2023-07-07 13:21:20 -05:00
Max Radermacher
5acabbe61f
Prepare interactions for modern recipient merging 2023-06-28 11:58:44 -05:00
Max Radermacher
13b676391b Merge OWSUserProfiles during recipient merges 2023-06-23 12:53:12 -05:00
Max Radermacher
1ca2d2a841 Add SignalRecipient isEqual & hash methods 2023-06-14 11:29:06 -05:00
Max Radermacher
a96fb35bb7
Fix SignalAccount merging logic 2023-05-30 12:51:48 -05:00
Max Radermacher
94f96fcd8e
Migrate SignalRecipient to SDSCodableModel 2023-05-24 15:50:17 -07:00
Max Radermacher
1ee45299a6
Fix group member merges 2023-04-24 18:45:18 -07:00
Max Radermacher
7d0d59f451
Support contact merges for yourself 2023-04-20 14:11:51 -07:00
Max Radermacher
aaf1d0e0b6
Clean up SignalRecipient create & fetch APIs 2023-03-29 18:40:05 -07:00
Max Radermacher
52b29a7344
Clean up logic that builds the TSGroupMember table
Also:
* Remove Obj-C support from group member properties
2023-03-27 12:52:54 -07:00
Max Radermacher
ebf6b8f5e7
Support PNIs in SignalServiceAddress 2023-03-23 12:43:01 -07:00
Harry
a146e18aaf
Set up account state and exit registration
* 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
2023-03-09 21:54:51 -08:00
Max Radermacher
73ac0c69a1
Add SignalRecipient.deviceIds 2023-02-08 13:46:15 -08:00
Max Radermacher
d7c52b6ad0
Fix bugs marking SignalRecipients as registered
Previously, low-trust SignalRecipients wouldn’t be marked as registered
unless they were newly-created. Now, they are marked as registered in
places where they should be (eg, successfully sending a message or
fetching a pre key means that the device exists).

As part of this change, SignalRecipients are unregistered by default,
though most call sites still mark them as registered immediately, so the
behavior in practice will be identical. There are a few places (such as
ensureAccountId) which will no longer mark new values as registered.

Finally, creating a new SignalRecipient would also update Storage
Service, even if that recipient was created in response to a storage
service update. Now, recipients updated as part of storage service
operations won’t immediately trigger another storage service update.
2023-01-03 13:23:33 -08: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
Nora Trapp
9776699137 Sync when contacts become unregistered 2022-09-15 14:09:03 -07:00
Matthew Chen
ff497ead1b Fix broken test. 2021-12-01 15:38:01 -03:00
Matthew Chen
23a98d724c Fix edge case in uuid<->phone number mapping changes. 2021-12-01 15:34:07 -03:00
Matthew Chen
211b93581b Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Nora Trapp
d536c8ded0 PR Feedback 2020-07-24 13:15:32 -07:00
Nora Trapp
dde6f0bc59 Add tests around uuid <-> phone number mapping changes 2020-07-24 13:15:32 -07:00