Commit Graph

52 Commits

Author SHA1 Message Date
Sasha Weiss
242dfd2bce
Add all JobQueues to environment, via a wrapper
Currently, only some `JobQueue` types are initialized during startup
(as part of `Environment`, or `SSKEnvironment`). Initialization is
required, however, for a `JobQueue` type to restart any latent jobs.
That means that, for example, a durable `SendGiftBadge` job that failed,
and should be reattempted at a later date, will not in fact be restarted
since no `SendGiftBadgeJobQueue` will be initialized at launch.

This change adds `SSKJobQueues` and `SignalMessagingJobQueues` types,
which are intended to be singletons that hold within them a singleton
job queue for each of our `JobQueue` types. These wrappers are added to
`SSKEnvironment` and `Environment` (from SignalMessaging) respectively,
ensuring that all the `JobQueue`s they contain are initialized as part
of environment setup. The wrappers also avoid the need to add a new
property to the (already large) environment types for each new future
`JobQueue`.

This change also updates all existing call sites that accessed a
`JobQueue` from an environment object, to direct that access now through
the wrapper type.
2022-11-09 14:08:44 -06: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
Harry
4a955ade9d
Various fixes related to enabling/disabling stories
* Don't donate share intests for outgoing story group replies

* Properly hide tab bar when using reduced transparency setting
2022-10-13 08:33:13 -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
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
32b88948e8
Clear story messages before attachments 2022-09-23 11:52:46 -07:00
Sasha Weiss
121161e212
Clear StoryMessage instances when clearing all chat history 2022-09-22 15:22:52 -07:00
Nora Trapp
01e06e50a6 Don't record send message intents for stories 2022-09-16 11:28:34 -07:00
Nora Trapp
de0ef9444b Fix some usage of NSLocalizedString 2022-09-11 10:36:23 -07:00
Nora Trapp
73316f2420 Notify for replies to group stories 2022-09-08 17:12:24 -07:00
Max Radermacher
e79f37cc01 Prefer disappearingMessagesDuration(…)
The behavior is the same, and this avoids repeating the same code.
2022-06-22 08:10:55 -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
Nora Trapp
00dedae3e0 Fix 1:1 sharing suggestions 2022-03-19 11:41:36 -07:00
Nora Trapp
99350fb38c Rename HomeViewController to ChatListViewController 2022-03-16 17:51:51 -07:00
Nora Trapp
b57a5bedd7 Populate INSendMessageIntentDonationMetadata 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
a50b328efd Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
7d3b249845 Respond to CR. 2021-10-08 10:41:58 -03:00
Matthew Chen
78760da3d7 Log intent avatar behavior. 2021-10-08 10:41:11 -03:00
Matthew Chen
d7a4154c52 Disable notification intent avatars in NSE. 2021-10-08 10:41:11 -03:00
Nora Trapp
0ab3b63016 Log message send benchmarks in production 2021-09-08 21:41:13 -03:00
Matthew Chen
f29922b9af Refine message send milestones. 2021-09-08 21:41:13 -03:00
Matthew Chen
5de4cb26c5 Refine message send bench milestones. 2021-09-08 21:41:13 -03:00
Matthew Chen
5e7636ec62 Add metrics around rendering message sends. 2021-09-08 21:41:13 -03:00
Nora Trapp
2814ab7629 Convert to new Promise library 2021-09-03 11:41:34 -07:00
Eugene Bistolas
77854791ec iOS 15: Notifications generated via NSE show failover images, notifications fail to post 2021-08-30 07:07:04 -10:00
Matthew Chen
0957a5df49 Merge branch 'release/5.19.0' 2021-08-27 22:15:56 -03:00
Nora Trapp
15cb0a5730 Add benchmarks around various message sending milestones 2021-08-27 12:55:57 -07:00
Eugene Bistolas
de67f4cede Update NSE avatar size, add more logging 2021-08-26 09:47:12 -10:00
Matthew Chen
617a8b3acd Fix message forwarding issues. 2021-08-25 11:04:13 -03:00
Eugene Bistolas
c70817eb1c Group call avatars incorrectly configured, ensure incoming donations do not occur for correct notification settings 2021-08-18 13:26:24 -10:00
Eugene Bistolas
e166caa1de iOS 15 Notification Action Glyph Support 2021-08-18 08:29:53 -10:00
Eugene Bistolas
bd645b3048 iOS 15 communication notification support for calls 2021-08-17 13:19:14 -10:00
Eugene Bistolas
c266385eb4 Review feedback 2021-08-17 12:02:42 -10:00
Eugene Bistolas
a4c3bb9c90 iOS 15 communication notification support for messages 2021-08-17 10:48:39 -10:00
Nora Trapp
65ff51acb4 Send all messages via MessageSenderJobQueue 2021-08-16 13:27:43 -07:00
Matthew Chen
3f07db9e37 Clean up async completions. 2021-07-07 09:49:44 -03:00
Matthew Chen
3dddd5276e Fix crash in ThreadUtil. 2021-07-06 15:49:15 -03:00
Matthew Chen
1d5b2aa2f5 Rework avatar building and caching. 2021-06-18 14:01:32 -03:00
Matthew Chen
9e8f87ae0a Clean up how local user name is rendered in contact cells. 2021-05-04 21:45:15 -03:00
Matthew Chen
8baf952a71 Apply ConversationAvatarView. 2021-04-22 22:00:42 -03:00
Matthew Chen
235eb5d119 Payments changes in SignalMessaging. 2021-04-06 13:57:07 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Nora Trapp
35db1c05a5 Add privacy setting to disable sharing suggestions 2021-01-21 20:00:52 -08:00
Nora Trapp
7230dabbc8 Add support for sharing suggestions 2021-01-21 20:00:29 -08:00
Nora Trapp
08baf57151 Allow sharing to multiple threads 2021-01-12 15:33:54 -08:00
Nora Trapp
f67bffd637 Add link preview support to share extension and forwarding 2020-09-08 19:58:29 -07:00
Matthew Chen
3e1dd2d894 Respond to CR. 2020-08-05 14:28:15 -03:00