Commit Graph

36 Commits

Author SHA1 Message Date
Max Radermacher
22c254eecd
Rename NotificationPresenter-related types 2024-04-11 18:45:25 -05:00
Max Radermacher
20783085bb
Replace SAMKeychain with direct keychain access 2024-04-05 21:50:00 -05:00
Jordan Rose
2727a70b90 Make AtomicValue's lock-sharing explicit
Also:
- Remove AtomicUInt's @objc, it's no longer used from ObjC
- Remove Codable conformances, they would implicitly use shared locks
  and weren't used in practice
2024-03-27 10:57:32 -07:00
Max Radermacher
be4cada92d
Clean up some info lines 2024-03-27 12:08:43 -05:00
Ehren Kret
d4e17730f3 remove import SignalMessaging statements 2024-03-12 03:35:34 -05:00
Sasha Weiss
a301e40ecc
Add missed-call badging to the Calls Tab 2024-02-27 14:55:15 -08:00
Max Radermacher
eaf3013a16
Use Guarantee for MessageProcessor wait method 2024-01-17 11:57:19 -06:00
Max Radermacher
59f2f23d68
Swiftify ReceiptSender (OWSOutgoingReceiptManager) 2024-01-04 15:55:39 -06:00
Max Radermacher
32a4f57a4d
Rename OWSMessageManager to MessageReceiver 2023-12-04 15:48:09 -06:00
Max Radermacher
84fb33a4cc
Remove noisiness when the app launches 2023-11-21 11:44:11 -06:00
Sasha Weiss
84957f66eb
Clean up InteractionFinder 2023-08-21 18:08:10 -07:00
Max Radermacher
acaedcc035
Update app icon/tab bar badge asynchronously 2023-05-24 14:04:31 -07:00
Max Radermacher
0def4f62f0
Swiftify some DebugLogger code 2023-05-02 16:41:46 -07:00
Evan Hahn
d9d6ce3ea4
Move AppExpiry off Dependencies and NSObject 2023-04-20 12:46:21 -05:00
Harry
003cc19e62
Update SignalCoreKit. Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params
* Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params

* Update SignalCoreKit
2023-02-07 16:14:39 -08:00
Harry
6556f389c7
Rotate APNS tokens automatically when the NSE fails to receive notifications
* Allow using a transaction for checking APNS token

* Add APNSRotationStore

* add APNSRotationStoreTest

* Rotate APNS tokens in SyncPushTokensJob

* Mark NSE as having processed messages for token rotation

* Check for APNS token rotations after flushing incoming message queue

* pr comments

* Simplify APNS rotation conditions: we mark APNS as working when getting a push in either the NSE or the main app, and rotate if we missed a message since then.

* Mark APNS tokens as working if we ever get a push. Don't rotate known-good tokens.

* Added logging

* add remote flags to control behavior

* pr comments

* fix bad merge

* invert kill switch

* PR nit comments

* Avoid write transactions on the SyncPushTokensJob hot path

* Initial PR feedback, more to come

* Change of strategy: rotate if we have new messages to process on app startup

* PR comments

* use null for calltype column on incoming message rows
2022-12-19 11:10:15 -08:00
Sasha Weiss
a2e138abfb
Ensure logging during NSE initialization is recorded 2022-11-01 20:32:54 -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
Nora Trapp
835128419e Cleanup NSE logging 2022-09-27 17:05:05 -07:00
Nora Trapp
dd37ca526d Allow NSE to manage lifetime of proxy relay server 2022-09-27 17:05:05 -07:00
Nora Trapp
f06d5f629a Wait for proxy to be ready before fetching messages in NSE 2022-09-26 13:48:00 -07:00
Sasha Weiss
6eafbc20d2
Check pending/delivered notifications in NSE 2022-09-01 17:06:11 -07:00
Sasha Weiss
f57fcca526
Set the badge count in the NSE with a closure 2022-09-01 15:12:17 -07:00
Sasha Weiss
ac05bfc690
Add the concept of a correlation ID to NSE logging 2022-08-03 10:33:15 -07:00
Evan Hahn
e679707038 Fix SwiftLint shorthand_operator violations
The gist is:

```diff
-foo = foo + 1
+foo += 1
```

Most of the violations were in generated files, so I changed and re-ran the generator.

A few of these violations required implementing some new methods, which I added tests for.

See [the docs for this rule][0].

[0]: https://realm.github.io/SwiftLint/shorthand_operator.html
2022-06-07 14:51:57 +00:00
Michelle Linington
640a0e1aa0 PR Feedback 2022-03-04 14:16:58 -08:00
Michelle Linington
0fccce9c13 Bug fixes and queue management:
- Move NSE notification waiter to be the very last thing we wait on.
  This ensures that notifications enqueued while the message manager
  handles messages make it to UserNotifications
- Current call can now be accessed off the main thread
- All group call message handling occurs off the main thread
2022-03-04 14:16:29 -08:00
Michelle Linington
62e804da5f Plumbing 2022-03-04 14:16:29 -08:00
Jordan Rose
07712f6977 NSE: Log when each step of message processing is complete
Previously we only logged when everything was complete, or if we timed
out, but neither helps when tracking down memory overallocation
issues, since the NSE is killed before any of these logs print. With
this we have a better chance at seeing which jobs are outstanding.
2022-03-01 16:19:38 -08:00
Michelle Linington
61d091cc9c Lint 2022-01-06 11:32:24 -08:00
Michelle Linington
2133f600e3 More detailed logging of memory consumption 2022-01-06 11:32:24 -08:00
Michelle Linington
36220a1f2e Uses walltime in the NSE completion promise timeout 2021-12-16 14:49:16 -08:00
Michelle Linington
701931175c PR Feedback: Fix inverted case 2021-11-02 14:46:00 -07:00
Michelle Linington
500bc216a4 A handful of tiny changes
- GiphyAPI kept no internal state, no need to instantiate a singleton
  for it
- Better logging of what prevented us from completing our NSE wake
- Fixes a bug where we fail to generate sync messages in the NSE while
  locked
2021-11-02 14:46:00 -07:00
Michelle Linington
f6a26c6344 Track running badge count in NSE 2021-10-29 19:26:59 -07:00
Matthew Chen
8472571d0a Rename NSE. 2021-10-28 11:40:26 -03:00