Commit Graph

90 Commits

Author SHA1 Message Date
Sasha Weiss
4a7be90003
Send support for DeleteForMe sync messages 2024-06-04 15:18:39 -07:00
Sasha Weiss
11e9404d76
Add ThreadSoftDeleteManager 2024-06-04 14:58:58 -07:00
Sasha Weiss
0f4289fc73
Replace interaction anyRemove with InteractionDeleteManager 2024-06-04 14:51:52 -07:00
Sasha Weiss
d8627324fa
Require a V2 group model for group creation 2024-04-19 15:37:45 -07:00
Harry
8ef0ddf52e
Remove attachmentIds from MessageBuilder 2024-04-08 11:18:59 -07:00
Elaine
659e897dc9
Allow nicknames to be saved and displayed 2024-04-05 09:35:57 -06: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
Max Radermacher
0a24b7b357
Clean up recipient searches 2024-03-07 11:57:45 -06:00
Max Radermacher
3601f82bb9
Swiftprotocolify OWSContactsManager 2024-02-27 16:52:27 -06:00
Max Radermacher
abf1ee67a5
Fix system contact handling for hidden numbers 2024-02-16 16:25:38 -06:00
Max Radermacher
5e6ce4e388
Add & use PhoneNumberVisibilityFetcher 2024-02-14 19:06:59 -06:00
Max Radermacher
ded1d2f5b8
Assume everybody is PNI-capable 2024-02-13 14:53:39 -06:00
Max Radermacher
4c6aa8d573
Simplify ContactsManagerProtocol 2024-02-06 12:22:02 -06:00
Max Radermacher
9ab48596ca
Stop abusing SignalAccount to cache connections 2024-02-01 12:23:00 -06:00
Max Radermacher
3d495e0eb3
Simplify 1:1 name collision detection 2024-02-01 11:55:13 -06:00
Max Radermacher
3ce5e8c3d3
Set debug-only db trace default to false 2023-11-21 11:03:52 -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
ef1dfc1316
Add messageBody as a type of DisplayableText 2023-07-07 13:41:24 -07:00
Igor Solomennikov
20c55e7dec
Add necessary imports to Swift files.
Necessary for converting ChatListVC to Swift.
2023-06-05 16:04:48 -07:00
Igor Solomennikov
f8a79687a7
Remove unnecessary @objc from the main app target. 2023-05-16 16:33:45 -07:00
Max Radermacher
fcb5b60ec3 Remove anyRemoveAllWithoutInstantation 2023-05-05 14:52:48 -07:00
Harry
c8da382654
Handle text formatting styles in conversation list snippets 2023-05-03 22:04:05 -07:00
Max Radermacher
22ef2d8e55
Swiftify AppSetup 2023-04-12 17:54:48 -07:00
Max Radermacher
3b75249144
Stop performing searches if they’ve been canceled 2023-04-10 13:38:14 -07:00
Sasha Weiss
44a6fa24ab
Add contacts' usernames to ContactRecord, if nothing better available 2023-02-14 13:42:53 -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
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
Evan Hahn
f8e81df1c7 Fix duplicate import
This fixes our one violation of Swiftlint's [`duplicate_imports`
rule][0].

[0]: https://realm.github.io/SwiftLint/duplicate_imports.html
2022-04-29 13:02:19 -05:00
Nora Trapp
99350fb38c Rename HomeViewController to ChatListViewController 2022-03-16 17:51:51 -07:00
George Nachman
36119e4367 Introduce Refinery to help batch DB queries.
This PR is the first in a series that will
optimize looking up full names of group members.

The biggest source of slowness when opening a
group chat is looking up the full names of group
members in the search for duplicates. It is slow
because it requires multiple db queries for each
member.

The characterstic feature of this algorithm is the
iterative process of assigning names to signal
addresses. For example, some contacts' names may
be cached. For others, their profiles must be
fetched. For those without profiles, their phone
numbers must be formatted (which requires fetching
SignalAccounts). For those without phone numbers,
their user names must be formatted.

This PR creates a class called Refinery. Its job
is to make it easy to assign values to keys
through multiple passes, where each pass may
succeed only for a subset of keys.

This is useful because we will eventually issue a
single DB query for some of these passes.
2022-03-04 10:44:07 -08:00
George Nachman
194c37df14 Add missing methds in tests.
Fixes a break introduced by
7702463524.
2022-02-11 15:47:38 -08:00
Matthew Chen
c494fb2a44 Don't cache contacts on contacts manager. 2021-10-22 19:09:44 -03:00
Matthew Chen
3bd17e2790 Don't cache contacts on contacts manager. 2021-10-22 19:09:29 -03:00
Matthew Chen
48ab796248 Don't cache contacts on contacts manager. 2021-10-22 19:09:29 -03:00
Matthew Chen
4706ccd612 Convert ConversationListView to HomeView. 2021-07-21 16:33:52 -07:00
Matthew Chen
9bcd8ae44a Fix broken tests. 2021-06-17 12:10:55 -03:00
Matthew Chen
2c7c7b3d1c Replace ConversationColors with "avatar colors". 2021-05-25 16:22:31 -03: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
523a189a18 Fix broken test. 2021-04-23 18:52:32 -03:00
Nora Trapp
927ae76821 Re-style conversation search results screen 2021-04-22 13:10:45 -07: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
Matthew Chen
6762ce8452 Update design of conversation list view cells. 2021-01-21 20:27:31 -03:00
Matthew Chen
111338b59d Rewrite conversation view. 2020-12-10 12:44:13 -03:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03:00
Nora Trapp
18e19088a5 Fix broken tests 2020-08-28 13:10:47 -07:00
Fumiaki Yoshimatsu
82f050c168 Adds a new mock method to the protocol implementation in the tests. 2020-08-28 09:43:54 -07:00
Nora Trapp
d536c8ded0 PR Feedback 2020-07-24 13:15:32 -07:00