Commit Graph

72 Commits

Author SHA1 Message Date
Harry
71f4db0c01
Split ThreadUtil.enqueue for edits vs normal messages 2024-04-04 15:34:00 -07:00
Harry
44cd5c6b88
Clean up some unused TSMessage params 2024-04-04 15:32:52 -07:00
Harry
6acaf28187
Clean up PreparedOutgoingMessage 2024-04-04 12:55:20 -07:00
Max Radermacher
c06d92f163
Split Contact & SystemContact 2024-04-02 13:37:36 -05:00
Max Radermacher
638e4f9421
Simplify & stabilize system contact parsing 2024-04-02 12:54:03 -05:00
Harry
16d810e9fa
Use TSResourceId in upload notifications 2024-03-29 14:44:00 -07:00
Harry
4ce5fbd7d9
Remove unsafe message getter from UnpreparedOutgoingMessage 2024-03-29 14:49:27 -05:00
Harry
600daabd6f
Build outgoing contact avatars using TSResourceManager 2024-03-29 11:36:11 -07:00
Harry
0236ac4491
Use new PreparedOutgoingMessage in attachment multisend 2024-03-28 09:51:44 -07:00
Ehren Kret
d4e17730f3 remove import SignalMessaging statements 2024-03-12 03:35:34 -05:00
Ehren Kret
9c7078b3f8 migrate OWSContactsManager to swift
as the last remaining objective-c file, this removed direct dependency
from the SignalMessaging framework headers on SignalServiceKit and
thus required adding lots of import statements
2024-03-09 10:45:55 -06:00
Harry
4600fbd440
Add initial TSResourceStore 2024-02-28 08:20:29 -08:00
Max Radermacher
03288e8be0
Introduce DisplayName for rendering names 2024-02-27 18:21:30 -06:00
Max Radermacher
473824b9b1
Update contact sharing for phone number hiding 2024-02-14 19:09:36 -06:00
Harry
00a73e072d
Use transactions in TSMessage attachment id(s) getters/setters 2024-02-06 08:50:44 -08:00
Pete Walters
5429ec20bd
Refactor CDN2 uploads 2024-02-02 12:41:21 -06:00
Max Radermacher
585a6ceb32
Remove some sneaky transaction methods 2024-02-01 11:38:31 -06:00
Max Radermacher
ba4034f5a7
Remove SSKJobQueues 2023-12-11 14:22:22 -06:00
Max Radermacher
590ff88b52
Don’t mark messages isHighPriority if they’re not 2023-12-08 14:26:13 -06:00
Igor Solomennikov
be1d8220d3
Convert OWSContact to Swift. 2023-11-07 16:21:00 -08:00
Igor Solomennikov
c7df94a5e6
Updated design for contact sharing. 2023-11-07 13:50:19 -08:00
Max Radermacher
9c564f3c67
Clean up verification state changes & ignore PNIs 2023-10-11 10:52:38 -05:00
Max Radermacher
d9aca38045
Fix untrusted identity cache 2023-08-31 09:40:13 -05:00
Max Radermacher
434317cb02
Swiftify & protocolize OWSIdentityManager 2023-08-29 10:28:11 -05:00
Pete Walters
020d099607
Add Edit Send Plumbing 2023-06-30 09:47:55 -05:00
Harry
10985644b3
Add text formatting send support. 2023-06-23 10:26:46 -07:00
Max Radermacher
ca3b018734
Add & use DisappearingMessagesConfigurationStore 2023-06-05 11:00:38 -05:00
Igor Solomennikov
488bb72de7
Remove unnecessary "@objc" in Share Ext and NSE. 2023-05-16 16:35:42 -07:00
Harry
b3700d07ce
Refactor mention/style/search result attribute application 2023-05-01 13:57:07 -07:00
Igor Solomennikov
6dd3d9a6f2
Convert all convenience methods in UIFont+OWS to Swift. 2023-04-18 17:14:51 -07:00
Max Radermacher
a8511014cb
Use LocalIdentifiers in Storage Service 2023-04-14 10:20:58 -07:00
Harry
a146e18aaf
Set up account state and exit registration
* Go to chat list view after registration

* sync system contacts during registration

* Use explicit local credentials for storage service operations during registration

* fix tests

* Quick hack to get through double pin confirmation

* Finishing touches

* lint

* fix build

* reload phone number discoverability after storage service sync

* fix tests again

* Take chat auth on account and contact record initializers

* Change around branches for clarity in OWSUserProfile

* pr comments

* Split ChatServiceAuth into the same and AuthedAccount

* fix tests

* merge woes
2023-03-09 21:54:51 -08:00
Max Radermacher
9a4bb85c44 Fix text story sharing from the share extension 2023-02-10 15:54:37 -08: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
5824871af9
Share sheet: allow sharing to story before processing completes 2022-11-16 10:28:06 -06:00
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
Evan Hahn
a941c82c14
Prefer isEmpty with strings
This change may improve performance slightly but should have no other
user impact.

`myString.isEmpty` is faster than `myString.count == 0` or equivalent,
because computing `count` may require iterating over the string.

I tried to fix all occurrences of this.

Tested this by sending a message in a group and doing a full
re-registration, just in case I broke something there.
2022-11-01 17:53:46 -05: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
Harry
3f0fe34089
Disable view once media in stories send flow
* Disable view once media in stories send flow

* Remove stories from picker if sending a view once media

* dont show view once button if sending to stories from sharesheet
2022-10-11 13:11:48 -07:00
Nora Trapp
49ed068fcd Allow sharing text to stories 2022-10-03 21:35:32 -07:00
Nora Trapp
66c25a4afd Batch update identity keys and present safety number sheet on camera first and sharing flows 2022-09-08 09:42:43 -07:00
Nora Trapp
b82cd6c654 Add ability to send to group stories 2022-07-15 15:05:03 -07:00
Igor Solomennikov
7f4a5f3f7b Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
Evan Hahn
5696c50d7d Make some outgoing message params optional
We frequently send outgoing messages with some parameters, like "link
preview" or "quoted reply", empty.

This change lets those parameters be omitted (instead of explicitly
empty) for brevity.

This is a stylistic change and should have no user impact.

Tested this by sending a regular message, a message with a link preview,
and two messages with photos.
2022-06-23 12:53:05 +00: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
Jordan Rose
2b28780566 Share extension: Use default titles for sharing text and contacts
Instead of "Forward Message" and "Forward Contact", use the plain
"Message" and "Share Contact" used for non-forwarding purposes within
the app.
2022-05-11 13:37:47 -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
058a0213b7 Check whether you're blocked in a thread without a write transaction
In most cases when working with a ConversationItem we already have a
write transaction, but sometimes we don't. In this case, we know you
can only be blocked in a conversation if there's history in it (at
least as far as the local device knows), and so we can ignore any
threads that don't exist.
2022-02-18 14:00:27 -08:00