Commit Graph

25 Commits

Author SHA1 Message Date
Harry
768535363c
Require transaction in TSMessage.hasRenderableContent 2024-02-27 14:21:41 -08:00
Max Radermacher
ba4034f5a7
Remove SSKJobQueues 2023-12-11 14:22:22 -06:00
Max Radermacher
137b889e1a
Clean up some prod benchmarks 2023-11-27 16:03:41 -06:00
Max Radermacher
b045436091
Remove some verbose benchmarks 2023-11-21 11:13:09 -06:00
Harry
2ac759408a
[MOB] Payment messages in chat 2023-08-24 13:55:39 -07:00
Pete Walters
020d099607
Add Edit Send Plumbing 2023-06-30 09:47:55 -05:00
Igor Solomennikov
c84033a308
Convert OWSQuotedReplyModel to Swift as QuotedReplyModel. 2023-06-06 14:55:35 -07:00
Max Radermacher
ca3b018734
Add & use DisappearingMessagesConfigurationStore 2023-06-05 11:00:38 -05:00
Igor Solomennikov
ef5dc5c4fc
Convert ThreadUtil to Swift. 2023-05-30 09:45:08 -07:00
Igor Solomennikov
c054f3de91
Remove unnecessary "@objc" in SignalUI. 2023-05-16 16:39:19 -07: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
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
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
Evan Hahn
b5b560a0fe Shorten message send expiry timer lookup
Similar to e79f37cc01.
2022-06-22 14:35:48 -07:00
Evan Hahn
7e0fa84c6d Only add necessary completion callbacks to message send transaction
You can add callbacks to be executed when a transaction completes. We
usually do this when sending messages, but not always.

Previously, the logic was "add a callback that runs the completion
function, if it exists." Now, the logic is "if the completion function
exists, add a callback that runs it."

I think this slightly better reflects our intent, and helps reduce
memory usage (and potential capturing?) slightly.
2022-06-21 16:46:59 +00: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
Max Radermacher
b1874b4c5f Fix some _isDebugAssertConfiguration warnings
By moving the check after the `isLoggingEnabled()` check, there isn’t
unreachable code, so the compiler warning goes away. (The `_isDebug…`
check has to be second, or the `isLoggingEnabled()` call would be
unreachable code.)

For the other case, I wrapped the entire check in a single `assert`,
avoiding the `_isDebugAssertConfiguration` call altogether. (This one
wasn’t a warning, but I think this approach is more canonical, and it’s
probably best to avoid `_` functions where possible.)
2022-05-06 09:48:50 -05:00
Martin Böttcher
ff9f451c40
enhanced logging for better/automated performance analysis (#4039)
* added log output allowing automated performance analysis of app start and basic operations
* adjusted log messages
* changed logged event title
2022-03-03 08:15:40 +01:00
Nora Trapp
b57a5bedd7 Populate INSendMessageIntentDonationMetadata 2022-03-01 10:22:28 -08:00
Martin Böttcher
82e00c6894 reduced number of notifications used for clearing search after user interaction; message sending: only user iniitiated messages will lead to cleared search 2021-12-11 12:22:40 +01:00
Martin Böttcher
6d43471488 the search will be cleared as soon as the user reacts to a message, sends a message, initiates a call or changes the disappearing messages timer 2021-12-09 11:02:28 +01:00
Matthew Chen
b4627c1c24 Add SignalUI framework target. 2021-10-19 09:39:54 -03:00
Matthew Chen
25f015d8bc Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
498ffd22f2 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
a50b328efd Add SignalUI framework target. 2021-10-19 09:39:53 -03:00