Commit Graph

146 Commits

Author SHA1 Message Date
Harry
0fb2ecc9b8
Extend PersistableGroupUpdateItem to cover all group update cases
Co-authored-by: sashaweiss-signal <sasha@signal.org>
2024-01-12 13:41:00 -08:00
Harry
ebab35b4ba
Put all necessary metadata on PersistableGroupUpdateItem, never rely on separate metadata 2024-01-12 05:46:20 -08:00
Max Radermacher
208e234692
Remove a bunch of debug()/verbose() lines 2023-11-17 16:40:49 -06:00
Max Radermacher
9781408af8
Clean up some choo choo errors 2023-10-13 11:27:36 -05: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
Sasha Weiss
128d582a2a
Rip out notifications for sealed-sender decryption errors 2023-10-04 15:49:10 -07:00
Max Radermacher
1a9af9915b
Fix queue for edited message notifications 2023-10-04 13:23:05 -05:00
Harry
da921de7af
[Death to TSAccountManager, long live TSAccountManager][8] Final cleanup before callsites can be migrated 2023-09-29 12:19:26 -07:00
Max Radermacher
a5e958db0c
Call notification completion handler for edits 2023-09-13 21:04:43 -07:00
Harry
b9aaaa6dd5
Prompt user before crashing on device transfer receiving end 2023-09-11 17:20:54 -07:00
Max Radermacher
434317cb02
Swiftify & protocolize OWSIdentityManager 2023-08-29 10:28:11 -05:00
Harry
31ddc90368
Add "failed story send" notification 2023-08-28 16:27:23 -07:00
Max Radermacher
53b3dac1e5
[ServiceId] Update calling code 2023-08-23 23:47:14 -05:00
Max Radermacher
db95422569
[ServiceId] Migrate “storyAuthor” to Aci 2023-08-23 11:47:52 -05:00
Max Radermacher
251d1d6425
[ServiceId] Update mentions 2023-08-21 17:37:37 -05:00
Sasha Weiss
06e1a416cc
Remove the "Any...Finder" pattern from a bunch of types 2023-08-21 10:27:07 -07:00
Pete Walters
66d7592f59
Only update notifications for unread edits 2023-08-09 13:38:47 -05:00
Pete Walters
fca8785a6f
Allow edits to replace notifications silently 2023-08-07 14:19:13 -05:00
Harry
f728457039
Update build target to iOS 13.0 2023-06-08 16:21:20 -07:00
Igor Solomennikov
0ed81d560a
Convert OWSPreferences in SignalMessaging to Swift as Preferences. 2023-06-01 11:29:08 -07:00
Igor Solomennikov
064346e45a
Convert OWSSounds to Swift. 2023-05-30 10:23:08 -07:00
Igor Solomennikov
4bb09f8ed7
Convert DateUtil to Swift. 2023-05-30 09:37:36 -07:00
Igor Solomennikov
7790837eb5
Remove unnecessary "@objc" in SignalMessaging. 2023-05-16 16:41:49 -07:00
Harry
c8da382654
Handle text formatting styles in conversation list snippets 2023-05-03 22:04:05 -07:00
Harry
b55a740ce5
Notify @mentionees in group story replies 2023-04-18 15:00:14 -07:00
Harry
b6c6d60141
Fix long query for story replies 2023-04-18 13:08:03 -07:00
Sasha Weiss
f1063c1071
Migrate OWSDevice to SDSCodableModel 2023-04-13 14:00:46 -07:00
Max Radermacher
25825edd07 Swiftify some TSAccountManager code 2023-04-12 18:05:36 -07:00
Sasha Weiss
b8d24d6ec3
Show 'Message Request' as notification body for message request threads 2023-04-07 12:43:00 -07:00
Harry
224e5a7c6b
Parse text formatting styles in MessageBody
* add deserialization test for MessageBodyRanges

* Add style ranges to MessageBodyText

* add deserialization tests and fix small other test

* add basic mention hydration tests

* Add RTL support for @mention hydration

* Add a test with accents for unicode shenanigans

* unique-ify TODOs

* Add emoji test and fix implementation to account for multi-point unicode that is captured in NSString.length but not String.count

* Add more TODOs for text formatting

* Collapse style ranges on init

* Handle mention overlaps on MessageBodyRanges init

* add tests, update existing tests, fix bugs

* Update v2 deserialization test; the meaning of Style raw values has changed

* comment nit
2023-04-04 12:46:09 -07:00
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