Commit Graph

145 Commits

Author SHA1 Message Date
Sasha Weiss
4d66e0df2b
Proto changes for single-attachment delete-sync 2024-06-18 14:22:42 -07:00
Sasha Weiss
a28a18158a
Add clientUuid field to attachments 2024-06-17 11:56:26 -07:00
Sasha Weiss
019de3c247
Aci -> ServiceId for DeleteForMe sync messages 2024-06-13 11:11:07 -07:00
Sasha Weiss
e969fff067
Add DeleteForMe sync message protos 2024-06-04 15:07:28 -07:00
Max Radermacher
8e901365ea
Remove some extra spaces from protobuf files 2024-05-01 13:29:47 -05:00
Sasha Weiss
2b791566d9
Mark calls as read when opening the relevant conversation 2024-03-21 10:18:40 -07:00
Sasha Weiss
c664469f38
Bring in Specifications updates to CallLogEvent 2024-03-15 10:34:16 -07:00
Max Radermacher
58aed7e9c5
Include profileKey on call offers and accepts 2024-03-12 14:45:38 -05:00
Max Radermacher
8d64ca2055
Stop sending isBlocked during contact syncs 2024-03-04 17:33:36 -06:00
Sasha Weiss
13cab8a5c3
Add sync message for clearing missed-call badge 2024-02-27 15:24:24 -08:00
Pete Walters
3415c128bf
Add spam reporting protos 2024-02-21 10:51:02 -06:00
Sasha Weiss
36c959a6ff
Add support for "Delete All" from the Calls Tab 2024-02-13 11:01:57 -08:00
Sasha Weiss
f9dda2554f
Handle incoming "delete call event" sync messages 2024-02-05 12:55:42 -08:00
Jim Gustafson
3a88e287fa Remove legacy call message fields 2024-01-05 11:27:57 -08:00
Max Radermacher
0aae65173a
Remove deprecated ContactDetails proto fields 2023-11-15 18:23:26 -06:00
Harry
77cbdba235
Handle incoming master key sync messages 2023-10-16 13:41:33 -07:00
Sasha Weiss
d5848b7dd4
Restructure CallRecord in preparation of group call disposition 2023-10-12 14:44:40 -07:00
Max Radermacher
c57376a269
Remove unused/obsolete payments code 2023-08-24 18:05:38 -05:00
Harry
ecbb1057c9
[MOB] Payments activation request in chat 2023-08-24 15:38:13 -07:00
Pete Walters
0818e359d5
Update PniHelloWorld to add PQ keys 2023-08-15 15:37:20 -05:00
Max Radermacher
be8ba49b4e
[ServiceId] Update protobuf field names 2023-08-02 17:21:59 -05:00
Sasha Weiss
2845d60e13
Remove lots of GV1-related code 2023-06-01 11:47:43 -07:00
Max Radermacher
0b574cfbc8
Remove E164s from a bunch of protobufs 2023-05-12 00:38:01 -07:00
Harry
1fe5612cff
Support text formatting in text stories 2023-05-11 10:42:37 -07:00
Sasha Weiss
a6fbbefa9b
Remove PniIdentitySyncMessage 2023-05-10 14:35:48 -07:00
Max Radermacher
2599b85e0b
Remove legacyMessage & clean up REST envelopes 2023-05-10 14:34:42 -07:00
Pete Walters
d702a39286 Add EditMessage protos 2023-03-30 15:16:53 -05:00
Harry
9edc36e63a
Update BodyRange proto definition for rich text 2023-03-30 12:30:13 -05:00
Sasha Weiss
56ba9f3d7a
Atomically persist values from change-number 2023-03-23 16:50:59 -07:00
Max Radermacher
ebf6b8f5e7
Support PNIs in SignalServiceAddress 2023-03-23 12:43:01 -07:00
Sasha Weiss
82fad84831
Initial implementation of PNI change-number 2023-03-09 17:13:16 -08:00
Evan Hahn
8d707a9c74
Add spam reporting tokens 2023-01-25 14:14:57 -06:00
Harry
b3136fb42c
Call Disposition
* Add CallEvent sync message proto

* Add CallRecord class and db table

* Renames and comments for clarity

* create and update CallRecord from local device call events

* Handle incoming call event sync messages

* Add outgoing call sync event piping

* Send call event sync messages

* Handle call record sync messages before the app is launched

* Mark TSCall interactions as read and update their status when getting call event sync messages

* Prevent CallKit race conditions by checking state before creating TSCall interactions

* Update chat call event text for unanswered and declined calls

* Remove incorrect debug assert which fires every time a call is missed in the background

* PR comments, mostly nits

* convert old debug assert into a log + task comment

* nit

* Update copy for in chat call logs

* Smaller PR comments

* Add foreign key to CallRecord's interactionUniqueId

* Update write transaction ordering comment

* run genstrings

* fix strings
2023-01-10 11:48:46 -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
Nora Trapp
2d341189dd Drop invalid messages with the story flag on the envelope 2022-10-05 12:24:13 -07:00
Evan Hahn
4a0141be41
Omit E164 from outgoing envelopes
[Android][0] and [Desktop][1] have already removed this field. This
follows suit.

The highlights:

- `SignalService.proto` removes some fields by making them `reserved`
- `ProtoWrappers.py` updates our code generation to support addresses
  that only have a UUID (previously, you needed both a UUID and E164
  field)
- Most everything else is removing E164s

[0]: 9c266e7995
[1]: 2b0d3cab40
2022-10-03 23:55:39 +00:00
Evan Hahn
653cb30a59 Use reserved in protobufs
_This change should have no user impact._ And you can see that the only
changes to generated files are in comments.

Before this change, we used comments to denote reserved or deprecated
fields. This works, but I think we should instead use the `reserved`
keyword, which offers a few advantages. From [the protobuf docs][0]:

> If you update a message type by entirely removing a field, or
> commenting it out, future users can reuse the field number when making
> their own updates to the type. This can cause severe issues if they
> later load old versions of the same .proto, including data corruption,
> privacy bugs, and so on. One way to make sure this doesn't happen is
> to specify that the field numbers (and/or names, which can also cause
> issues for JSON serialization) of your deleted fields are reserved.
> The protocol buffer compiler will complain if any future users try to
> use these field identifiers.

This updates our proto files to use `reserved` instead of comments. It
also adds support to our wrapper script. (I moved a few things around in
that script, too, for consistency.)

I think this is a useful change on its own, but I think it'll make
things a little better when we deprecate some fields, which we're
planning to do soon.

[0]: https://developers.google.com/protocol-buffers/docs/proto3#reserved
2022-09-27 18:45:38 +00:00
Igor Solomennikov
607fdc810e
Add support for multi-point gradient background in text stories.
Also update palette of background colors and gradients to latest spec.
2022-09-14 08:26:23 -07:00
Evan Hahn
088c3e5d85 Remove unused relay field from envelope proto 2022-07-29 11:35:55 -05:00
Max Radermacher
369118b045 Add support for replying to gift messages 2022-07-07 10:49:20 -07:00
Nora Trapp
477f312c1e Send and receive sync transcripts for story messages 2022-06-24 00:35:31 -04:00
Jordan Rose
1c82df3bc9 Protos: Remove unused fields from DataMessage.Quote
These were never added to other clients, so we shouldn't be using
them.
2022-06-03 10:34:21 -07:00
Max Radermacher
fa99be971d
Add GiftBadge to SignalService.proto 2022-05-27 13:32:09 -07:00
Jordan Rose
4c8d7662a6 Add OWSIdentityManager.shouldSharePhoneNumber(with:transaction:)
When someone sends a message to your PNI, your responses (from your
ACI) must include a PNI signature, and the sealed sender certificate
you use during this period should include your phone number. This
confirms to the other user that your ACI is associated with your PNI.

This commit adds the state tracking that and ensures that both
TSOutgoingMessage and OWSUDManager check that state when building 1:1
messages and choosing certificates, respectively. Later commits will
set and clear this flag as needed.
2022-05-19 14:20:53 -07:00
Jordan Rose
a43f005d8d Add initial support for the PniIdentity sync message
This communicates the PNI identity key to existing linked devices,
which is important for linked devices to initially learn about a PNI,
or for the change of identity that comes with changing your number
(and therefore your PNI). The exact contents of this message will
probably change going forward, but here's a baseline to work off of.
2022-03-23 11:48:08 -07:00
Jordan Rose
30adb219d6 Recognize destinationUuid on envelopes, and filter out non-ACI
We're very close to being able to decrypt messages sent to our PNI,
but *until* that point it's best to just drop any such messages. This
should make testing easier.
2022-03-18 14:15:00 -07:00
Nora Trapp
626f1e2d23 Add StoryMessage protos 2022-03-16 17:50:01 -07:00
Nora Trapp
dc788cd347 Ignore messages with StoryContext 2022-01-26 10:28:52 -08:00
Eugene Bistolas
61989e9363 [Badging] Signal devices when subscription status changes 2021-12-02 21:04:47 -10:00
Michelle Linington
5093871fe7 Update opaque call message
RingRTC will now vend the urgency of an incoming opaque call message. We
can use this to determine whether or not we want the NSE to wake the
main app.
2021-09-01 12:51:39 -07:00