Commit Graph

40 Commits

Author SHA1 Message Date
Harry
5da3a3a498
Stop using TSIncomingMessage.sourceDeviceId 2023-12-19 11:16:26 -08:00
Harry
9037c31816
[Death to TSAccountManager, long live TSAccountManager][10] Delete old TSAccountManager 2023-10-05 09:23:41 -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
Max Radermacher
05b32b3911
[ServiceId] Update assorted smaller components 2023-08-17 15:59:38 -05:00
Max Radermacher
ac14bc637e
[ServiceId] Update TSIncomingMessageBuilder 2023-08-02 17:40:56 -05:00
Max Radermacher
17a2fb4093
Rename ServiceId -> UntypedServiceId 2023-07-26 16:56:19 -05:00
Max Radermacher
5acabbe61f
Prepare interactions for modern recipient merging 2023-06-28 11:58:44 -05:00
Max Radermacher
62965f6781
Convert TSThread.anyRemove to ThreadRemover 2023-05-10 14:03:08 -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
Evan Hahn
a066511a62 Remove useless test setup/teardown
We had a lot of functions like this, which are useless:

    override func setUp() {
        super.setUp()
    }

This removes them.
2022-10-04 14:06:34 -07:00
Matthew Chen
5d780d1589 Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
Matthew Chen
718120f725 Fix test imports. 2021-06-07 11:41:43 -04:00
Matthew Chen
37052a302a Fix build warnings around imports. 2021-06-07 11:11:30 -04:00
Michelle Linington
21f0fcb2ff Fixes broken tests related to the GroupMembers table
The TSGroupMember table is updated after every inserted interaction. It
asserts that the sender of the interaction is in the group membership.

Before, our tests would construct groups with mock membership and then
construct outgoing messages with the local address as the sender. This
would fail this new requirement.

The fix is to make sure that the local address is in the test group
membership if we'd like to "send" any messages.
2021-05-06 15:45:42 -07:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
255cfe1cfd Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Matthew Chen
c2cb189e16 Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Matthew Chen
529dbf09cd Fix unit tests. 2020-02-28 16:30:54 -03:00
Matthew Chen
72f912dce3 Versioned profile changes, etc. 2020-01-08 13:54:54 -03:00
Matthew Chen
29150102cb Revert group and profile changes. 2019-12-11 20:41:54 -08:00
Matthew Chen
0f8b2ccc74 Fix broken tests. 2019-12-05 12:37:22 -03:00
Matthew Chen
05c8e674ee Rework new group new creation & group updates. 2019-12-05 12:37:22 -03:00
Matthew Chen
b38a64cce8 Revert "Revert "Merge branch 'charlesmchen/groupManager2'""
This reverts commit 7530dee591.
2019-11-12 09:02:52 -03:00
Matthew Chen
7530dee591 Revert "Merge branch 'charlesmchen/groupManager2'"
This reverts commit 26fd0d0812, reversing
changes made to c17865b750.
2019-11-11 20:01:45 -03:00
Matthew Chen
fa9e49136d Apply group manager in tests. 2019-11-11 17:31:21 -03:00
Matthew Chen
b5f777d985 Fix more broken tests. 2019-11-07 17:37:48 -03:00
Michael Kirk
329fffb8e2 Fixing up phonenumber parsing tests 2019-10-25 18:33:56 -07:00
Matthew Chen
63c2cbf71b Fix broken tests. 2019-10-04 19:34:08 -03:00
Matthew Chen
d813419afa Fix TSMessageStorageTests. 2019-10-01 13:37:04 -03:00
Matthew Chen
20683678b5 Store group avatars as data. 2019-09-27 16:25:53 -03:00
Matthew Chen
e77e03afb2 Remove usage of primary storage. 2019-07-29 15:30:10 -03:00
Matthew Chen
4a7e3532e7 Remove YDB connections. 2019-07-25 10:25:45 -03:00
Michael Kirk
0c944fe9f4 Incoming message has authorAddress 2019-06-27 14:22:13 -06:00
Matthew Chen
a7a7499a8e Migrate more key-value stores. 2019-06-19 11:21:12 -04:00
Michael Kirk
691209e25e Decrypt Messages with AnyTransaction
- Migrate protocol stores to KVStores
- Introduce AnyDatabaseQueue
- Move messaging pipeline to AnyTransactions
- Migrate specialized PushDecrypt job to generic JobQueue
2019-05-21 16:20:22 -04:00
Matthew Chen
a477e01a4a Apply LinkPreview model. 2019-01-14 16:20:54 -05:00
Matthew Chen
7fd15d2fd9 Add server certificate methods to UD manager. 2018-10-02 13:24:00 -04:00
Matthew Chen
3738155c81 Fix build breakage from SMK. 2018-10-01 09:08:02 -04:00
Matthew Chen
98630cca50 Respond to CR; add db utility methods to test base classes. 2018-09-21 09:21:34 -04:00
Matthew Chen
66fc389fba Get SSK tests building and running. 2018-09-21 09:08:39 -04:00