Commit Graph

108 Commits

Author SHA1 Message Date
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
Nora Trapp
2814ab7629 Convert to new Promise library 2021-09-03 11:41:34 -07:00
Matthew Chen
e1f35f89f0 Add more logging around missing notifications. 2021-09-03 13:52:47 -03:00
Matthew Chen
a3a43751ce Add more logging around missing notifications. 2021-09-03 13:47:49 -03:00
Matthew Chen
9703fb18ab Update l10n strings. 2021-09-02 22:52:36 -03:00
Matthew Chen
2b502ad609 Elaborate logging around missing notifications. 2021-09-02 22:51:26 -03:00
Matthew Chen
0957a5df49 Merge branch 'release/5.19.0' 2021-08-27 22:15:56 -03:00
Eugene Bistolas
aa810205cf Defer NSE contentUpdating until donation completes, enable caching for avatars 2021-08-27 09:25:56 -10:00
Michelle Linington
86310a1855 Handling of invisible interactions 2021-08-26 20:29:21 -07:00