Commit Graph

24 Commits

Author SHA1 Message Date
Sasha Weiss
6ff76dd7e6
Do away with some ObjC test infra 2024-05-06 09:57:21 -07:00
Max Radermacher
456f2037ee
Stop putting kLocalProfileUniqueId in addresses 2024-04-23 13:58:27 -05:00
Ehren Kret
110a880d6c remove and disallow warnings in SignalServiceKitTests target 2024-04-21 09:55:30 -05:00
Sasha Weiss
f1f4e6977d
Do away with ensureGroupIdMapping 2024-04-19 15:46:18 -07:00
Ehren Kret
fd94424be0 start migrating MIMETypeUtil to swift 2024-04-11 22:19:16 -05:00
Pete Walters
f7ba1643d6
Move story onboarding settings kvstore from view -> manager 2024-04-09 17:39:29 -05:00
Harry
3c5682e653
Use TSResourceManager in story construction 2024-04-09 14:04:23 -07:00
Max Radermacher
dd08192895
Remove throws methods that can’t throw 2024-03-13 11:00:44 -05:00
Max Radermacher
ded1d2f5b8
Assume everybody is PNI-capable 2024-02-13 14:53:39 -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
Max Radermacher
3f522fa57a
[ServiceId] Update StoryMessage 2023-08-15 12:45:20 -05:00
Max Radermacher
e6f5f41370
[ServiceId] Update incoming message handling 2023-08-02 17:11:25 -05:00
Max Radermacher
b593cba603
Adopt randomForTesting/constantForTesting 2023-07-26 16:29:14 -05:00
Max Radermacher
a8511014cb
Use LocalIdentifiers in Storage Service 2023-04-14 10:20:58 -07:00
Harry
f7bc793ae9
Make SystemStoryManagerTest synchronous to end its reign of flaky terror
* Use schedulers with ChainedPromise

* Add full queue initializer redirection in Schedulers

* pass scheduler to OWSURLSession

* Use schedulers in SystemStoryManager

* make SystemStoryManagerTest synchronous
2023-03-29 08:47:49 -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
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
Max Radermacher
30bb2a52a8
Add OWSURLSessionEndpoint
Right now, we create a request before we make a session for a web
socket. However, as part of the next change, we’ll start creating the
request from the session. This new type breaks the circular reference;
we can create an endpoint, then a request, then a session.
2023-01-24 12:19:36 -08:00
Harry
9436ee6608
Use read state for the stories tab bar badge
* Use read timestamp in story badge count

* Add StoryBadgeCountManager

* Manager stories tab bar badge count in StoryBadgeCountManager

* Don't mark stories read while the app is backgrounded. Mark them read when foregrounding and on the tab bar

* Only mark the latest story per context as read

* fix tests
2022-10-18 16:22:50 -07:00
Nora Trapp
781444df45 Drop incoming stories from non-admins in announcement groups 2022-10-18 11:09:10 -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
1b00741b6d
Fix remaining SwiftLint failures, lint more strictly
This fixes our remaining SwiftLint violations, which were small.

It also updates the precommit script to fail if any violations are
found, even warnings. This will cause CI to fail if you include a file
that isn't SwiftLint-compatible.
2022-10-07 12:00:26 -05:00
Harry Sanabria
039571e440 Fix legacy onboarding story cleanup 2022-10-06 12:10:27 -07:00
Nora Trapp
6807ad8f02 Properly drop stories from untrusted sources 2022-09-15 10:26:34 -07:00