Commit Graph

217 Commits

Author SHA1 Message Date
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
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
Sasha Weiss
121161e212
Clear StoryMessage instances when clearing all chat history 2022-09-22 15:22:52 -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
9494498d70 Add support for sending group replies to stories 2022-03-31 00:34:32 -07:00
Martin Böttcher
8f9be31ba3 replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
Nora Trapp
b57a5bedd7 Populate INSendMessageIntentDonationMetadata 2022-03-01 10:22:28 -08:00
Matthew Chen
5d780d1589 Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
Matthew Chen
21a8175795 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
Nora Trapp
2814ab7629 Convert to new Promise library 2021-09-03 11:41:34 -07:00
Matthew Chen
617a8b3acd Fix message forwarding issues. 2021-08-25 11:04:13 -03:00
Nora Trapp
65ff51acb4 Send all messages via MessageSenderJobQueue 2021-08-16 13:27:43 -07:00
Matthew Chen
3dddd5276e Fix crash in ThreadUtil. 2021-07-06 15:49:15 -03:00
Eugene Bistolas
28ebb31b8b PR feedback for 5.15.0 beta feedback: Messages delayed insert on send 2021-07-02 09:13:07 -10:00
Eugene Bistolas
ef9f506249 5.15.0 beta feedback: Messages delayed insert on send 2021-07-01 13:28:04 -10:00
Nora Trapp
d29f943f66 Tweak how we decide when to set the default timer 2021-04-29 15:46:43 -07:00
Nora Trapp
9475658233 Sync universal expire timer 2021-04-29 15:46:43 -07:00
Nora Trapp
6783db210e Add default disappearing message timer 2021-04-29 15:46:43 -07:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Jordan Rose
15a4a1a9cd MediaGallery: delete old Finder API, including its Yap implementation 2021-03-04 10:30:54 -08:00
Nora Trapp
4ad4959a6e Fix problems with clear chat history 2021-02-05 11:26:11 -08:00
Nora Trapp
7230dabbc8 Add support for sharing suggestions 2021-01-21 20:00:29 -08:00
Nora Trapp
dad7ab4ac6 Don't scroll to deleted quoted replies 2020-10-09 10:37:03 -07:00
Matthew Chen
686aee752c Rename OWSMessageSender -> MessageSender. 2020-09-17 21:35:35 -03:00
Matthew Chen
c017e76aab Rename singleton accessors. 2020-09-17 21:11:09 -03:00
Nora Trapp
f67bffd637 Add link preview support to share extension and forwarding 2020-09-08 19:58:29 -07:00
Matthew Chen
95c52e21b6 Add support for animated stickers. 2020-09-02 13:44:14 -03:00
Matthew Chen
f80059f8e9 Add support for animated stickers. 2020-09-02 13:44:13 -03:00
Matthew Chen
510200a880 Respond to CR. 2020-08-05 14:28:15 -03:00
Nora Trapp
4696a4d993 Mention sending 2020-08-04 14:08:30 -07:00
Matthew Chen
aa7dcf2458 Respond to CR. 2020-06-12 13:49:52 -07:00
Matthew Chen
c209f0f579 Fix race when sending non-durable messages. 2020-06-12 13:49:52 -07:00
Matthew Chen
09ea5e8f1b Label the "slow write transactions" logging with the source of the transaction. 2020-06-07 10:37:55 -03:00
Matthew Chen
ba801f05ce Label the "slow write transactions" logging with the source of the transaction. 2020-06-07 10:37:55 -03:00
Matthew Chen
f9a38115ad Send invalid group updates from the debug UI. 2020-05-15 18:21:16 -03:00
Matthew Chen
f8b9b209ff Respond to CR. 2020-05-11 10:19:52 -03:00
Matthew Chen
fad9510dbe Add TSIncomingMessageBuilder. 2020-05-11 09:28:13 -03:00
Matthew Chen
dec0176eb3 Overhaul message request view.
* Fix input toolbar visibility after accepting group v2 invite.
2020-02-21 10:55:40 -03:00
Michael Kirk
f198d9037d Merge tag '3.5.0.5' 2020-02-19 19:26:05 -07:00
Michael Kirk
597c07291d DRY up hasPendingMessageRequestWithTransaction 2020-02-16 13:13:12 -07:00
Michael Kirk
eb07cda055 separate indexable query for groups 2020-02-15 11:37:24 -07:00
Nora Trapp
e420b2194c If there's a pending message request and we send a message to a thread, share our profile 2020-02-15 11:37:24 -07:00
Nora Trapp
f763b8624e Handle showing message request for non-incoming message interactions. 2020-02-15 11:37:24 -07:00
Nora Trapp
70d948843f Remote FF for message requests 2020-02-11 18:27:46 -08:00
Matthew Chen
647fb3a33f Rework "leave group", consolidate group update logic. Add groups v2 indicator. 2020-02-06 11:11:22 -03:00
Matthew Chen
740f57cad9 Add additional recipients for v2 group updates. 2020-02-06 10:26:02 -03:00
Michael Kirk
83d26fe62e revamp group updates - show source, show changes, show icon 2020-01-30 20:10:55 -08:00