Commit Graph

79 Commits

Author SHA1 Message Date
Harry
58c8d4544e
Use enum for ConversationItem.outgoingMessageClass 2024-04-19 14:22:40 -07:00
Harry
722331b9ab
Asyncify and simplify SharingThreadPickerViewController sending logic 2024-04-19 14:21:55 -07:00
Harry
42df2e2d20
Fix sharesheet attachment send progress sheet 2024-04-17 13:43:28 -05:00
Harry
eb7c1a2563
Unify TSAttachmentMultisend sharesheet and main app methods 2024-04-16 16:23:34 -07:00
Harry
bfa586f4e2
Wrap TSAttachmentMultisend transparently in TSResourceMultisend 2024-04-15 20:46:05 -07:00
Harry
fd94deb47b
Rename AttachmentMultisend->TSAttachmentMultisend 2024-04-15 20:44:45 -07:00
Ehren Kret
33c5d976a1 start simplifying share view controller 2024-04-09 10:48:17 -05:00
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