Commit Graph

116 Commits

Author SHA1 Message Date
Max Radermacher
898fd2c4d5
Clean up queue names 2023-02-27 14:16:09 -08:00
Evan Hahn
8e33543e7a Change Promise to Guarantee because it always resolves
This promise always resolves, so let's make it a `Guarantee`.

This change should have no user impact.
2023-02-08 14:11:30 -08:00
Max Radermacher
0c3cec9146
Update SignalCoreKit
* Update filterForDisplay call sites
2023-01-31 12:34:07 -08:00
Harry
df97cad708
Show a notification when being logged out via 403 from chat server
* Don't fail debug builds after locking the account and failing config lookup

* Show (no-op) notification when deregistered

* Show re-registration when tapping the push notification

* Remove asserts that can (and should) fail when deregistered

* run genstrings
2023-01-19 15:00:01 -08:00
Harry
e29ae33fed
Better past missed call handling in call disposition
* Mark previous call events read when a later call event is responded to

* Clear missed call notifications when a future call is actioned on any device

* Do two queries for TSCall updates
2023-01-17 16:05:55 -08:00
Evan Hahn
3bcbd60d86
Skip onboarding permissions screen if unnecessary
We ask users for contact and notification permissions during
registration.

If the user abandons registration after approving or denying these
requests, we don't need to show them the permissions screen again, as
it'll just show an "Allow Permissions" button that advances to the next
screen.

This also cleans up some of the methods. Not strictly related, but it
felt like a good time to rename some methods and clean up some logging
(especially because we're making changes here).
2023-01-12 16:42:13 -06:00
Jordan Rose
39a338aa21 Group calls: separate new/existing member safety number notifications
We've been presenting all safety number mismatches as "someone joined
the call you were already in", but sometimes they were in the call
first. In that case, we should use a different message.

While here, make these messages a little more concise so we can fit in
an explicit "Tap to view", to encourage people to come back to the app
and decide whether they want to stay in the call.
2022-11-14 10:01:04 -08:00
Jordan Rose
a87651e7ed Handle incoming group call rings
This adds a table of "cancelled group rings", to handle out-of-order
delivery between a cancellation and a ring. (This can happen when the
cancellation comes from a linked device rather than the original
ringer, though it's very unlikely.) Thirty-minute-old cancellations
are cleared lazily.

This also adds a new IncomingCallControls to replace the usual
CallControls in a GroupCallViewController.

And finally, there's a lot of code that was 1:1-call-specific that now
handles group calls as well, either by being more general or by
checking which kind of call we have.
2022-11-07 09:48:53 -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
Sasha Weiss
063acc1419
Batch messageId notification cancellations 2022-09-27 14:26:44 -07:00
Jordan Rose
bd264b462f Use rich intents whenever possible
For certain kinds of notifications, we attach "intents" to let the
system know who's contacting us (for use in, say, share sheet
suggestions; controlled by Settings > Chats > Share Contacts with
iOS). Previously we only provided "rich" intents on iOS 15 and a
minimal implementation for iOS 13, but even if iOS 13 won't do as much
with the information we can be more consistent.
2022-09-23 15:50:33 -07:00
Sasha Weiss
9c74e8dfcd
Serialize canceling notifications with posting them 2022-09-23 13:48:05 -07:00
Sasha Weiss
bbd3e8c531
Move function in UserNotificationsAdaptee 2022-09-22 12:22:06 -07:00
Sasha Weiss
f19eb02565
Improve read sync logging 2022-09-14 09:59:25 -07:00
Nora Trapp
9bd91f66b6 Allow turning off stories 2022-09-12 10:14:09 -07:00
Nora Trapp
73316f2420 Notify for replies to group stories 2022-09-08 17:12:24 -07:00
Sasha Weiss
da19c8584b
Add logs to UserNotificationsAdaptee 2022-09-01 17:06:42 -07:00
Sasha Weiss
af6ff96975
Make notificationCenter a static var in UserNotificationsAdaptee 2022-09-01 15:12:43 -07:00
Jordan Rose
e2376bac02 Prepare call notifications for group call rings
This mainly means passing around SignalCalls instead of
IndividualCalls, but while here it makes sense to be more explicit
about who the caller is.
2022-08-31 17:51:12 -07:00
harry-signal
c935307563
Add logging for notification sound debugging
* add logging for notification sound debugging

* use NSString path appending
2022-08-15 14:07:20 -07:00
Sasha Weiss
8ad360e71d
DRY out GroupUpdateCopy construction 2022-07-18 15:03:21 -07:00
Max Radermacher
5a0719c8cc Fix notification comment typo; avoid forced unwrap 2022-07-01 09:49:26 -07:00
Nora Trapp
7bd167f815
Initial story sending support
* Little fix for context menu

* Add 'My Stories' section to stories tab

* Add new story thread types

* Show stories in conversation picker

* Support for sending stories

* Update story list when sending stories

* Add basic 'My Stories' view controller

* Initial stories settings screens

* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class

* Require an explicit read transaction to initialize an outgoing message

* Fix linting

* Allow enabling group story from internal settings

* Fix tests

* PR Feedback
2022-06-10 22:28:03 -04:00
Evan Hahn
4c0e511793 Fix typos in localization string comments
I noticed a few typos in localization string comments while working on
c5bdf6c094. This fixes those.

This should have no (direct) user impact.
2022-05-16 12:26:31 -05:00
Jordan Rose
0a982ebc83 Include timestamp in missed call notifications
...if the call was more than five minutes ago. This should help in two
scenarios:

- you've been offline for a while, and you see "missed call" but don't
  know when they tried to call

- you hit that NSE bug where a ring gets processed hours or even days
  later, possibly when a second call arrives
2022-04-05 10:48:05 -07:00
Nora Trapp
b88b3ce396 Process incoming story context 2022-03-31 00:34:32 -07:00
Dimitris Apostolou
62724cf0be Fix typos 2022-03-18 11:31:06 -07:00
Martin Böttcher
8f9be31ba3 replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
Martin Böttcher
c0adfbfb32 NSLocalizedString is replaced by NSLocalizedStringFromAppBundle (reading strings from the bundle of the main app) for all source files called by an app extension and the localizable files are removed for the app extension targets. 2022-03-07 13:29:06 +01:00
Jordan Rose
34d60bf833 Always log when we present a user notification for an incoming message 2022-03-01 16:19:38 -08:00
Nora Trapp
b57a5bedd7 Populate INSendMessageIntentDonationMetadata 2022-03-01 10:22:28 -08:00
Nora Trapp
5921774053 Notify when you are quoted when 'mentionNotificationMode' is set to always 2022-03-01 10:22:28 -08:00
Nora Trapp
0948ba837b Cache built avatars to disk for NSE 2022-02-14 11:59:13 -08:00
Nora Trapp
a2f51dc4a3 Cleanup old feature flags 2022-01-24 10:53:55 -08:00
Nora Trapp
ac5aafaea9 Remove support for Xcode 12 2021-11-01 13:26:46 -07:00
Matthew Chen
df2a714437 Clean up NSE logging. 2021-10-19 22:45:58 -03:00
Matthew Chen
1adc997422 Elaborate logging around NSE lifecycle & memory usage. 2021-10-08 10:32:54 -03:00
Matthew Chen
a1ff722aad Fix race in notification cancellation. 2021-10-07 17:37:01 -03:00
Matthew Chen
eef9364f9d Elaborate logging around NSE message processing. 2021-10-06 09:26:38 -03:00
Matthew Chen
c3802fc5ef Post notifications off the main thread in the NSE. 2021-10-05 16:24:31 -03:00
Matthew Chen
b2b3c312b6 Cancel notifications off the main thread. 2021-10-05 16:24:31 -03:00
Matthew Chen
aba599241c Improve handling of voip pushes on iOS 15. 2021-09-30 16:41:32 -03:00
Matthew Chen
2a318c30fa Improve handling of voip pushes on iOS 15. 2021-09-30 16:41:32 -03:00
Matthew Chen
e70302ac8f Refine NSE completion blocking, message processing. 2021-09-27 19:04:46 -03:00
Matthew Chen
6463531178 Respond to CR. 2021-09-24 18:30:42 -03:00
Matthew Chen
818634b23a Explicitly block NSE completion on posting notifications, sending acks, etc. 2021-09-24 18:30:42 -03:00
Matthew Chen
c9cedeb8d6 Don't block on intent donation. 2021-09-16 15:47:49 -03:00
Matthew Chen
a82adcce60 Fix missing notifications with XCode 13 & iOS 14 and earlier. 2021-09-08 16:00:59 -03:00
Nora Trapp
0e3b1a196b Fix contentToUse mutability 2021-09-07 15:03:36 -07:00
Michelle Linington
7e6e99074e PR Feedback 2021-09-03 16:11:19 -07:00