Further improvements for backup import/export

This commit is contained in:
Fedor Indutny 2024-09-18 22:26:52 -07:00 committed by GitHub
parent b9cd858ec7
commit d5f44c1b8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 539 additions and 201 deletions

View file

@ -4290,7 +4290,7 @@ For more information on this, and how to apply and follow the GNU AGPL, see
``` ```
## attest 0.1.0, libsignal-ffi 0.57.1, libsignal-jni 0.57.1, libsignal-jni-testing 0.57.1, libsignal-node 0.57.1, signal-neon-futures 0.1.0, signal-neon-futures-tests 0.1.0, libsignal-bridge 0.1.0, libsignal-bridge-macros 0.1.0, libsignal-bridge-testing 0.1.0, libsignal-bridge-types 0.1.0, libsignal-core 0.1.0, signal-crypto 0.1.0, device-transfer 0.1.0, libsignal-keytrans 0.0.1, signal-media 0.1.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, signal-pin 0.1.0, poksho 0.7.0, libsignal-protocol 0.1.0, libsignal-svr3 0.1.0, usernames 0.1.0, zkcredential 0.1.0, zkgroup 0.9.0 ## attest 0.1.0, libsignal-ffi 0.58.0, libsignal-jni 0.58.0, libsignal-jni-testing 0.58.0, libsignal-node 0.58.0, signal-neon-futures 0.1.0, signal-neon-futures-tests 0.1.0, libsignal-bridge 0.1.0, libsignal-bridge-macros 0.1.0, libsignal-bridge-testing 0.1.0, libsignal-bridge-types 0.1.0, libsignal-core 0.1.0, signal-crypto 0.1.0, device-transfer 0.1.0, libsignal-keytrans 0.0.1, signal-media 0.1.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, signal-pin 0.1.0, poksho 0.7.0, libsignal-protocol 0.1.0, libsignal-svr3 0.1.0, usernames 0.1.0, zkcredential 0.1.0, zkgroup 0.9.0
``` ```
GNU AFFERO GENERAL PUBLIC LICENSE GNU AFFERO GENERAL PUBLIC LICENSE
@ -5154,6 +5154,201 @@ You should also get your employer (if you work as a programmer) or school, if an
``` ```
## libcrux-intrinsics 0.0.2-alpha.3, libcrux-ml-kem 0.0.2-alpha.3, libcrux-platform 0.0.2-pre.2, libcrux-sha3 0.0.2-alpha.3
```
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2023 Cryspen Sarl
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
## ryu 1.0.18 ## ryu 1.0.18
``` ```
@ -5336,7 +5531,7 @@ END OF TERMS AND CONDITIONS
``` ```
## debugid 0.8.0, prost-build 0.13.1, prost-derive 0.13.1, prost-types 0.13.1, prost 0.13.1 ## debugid 0.8.0, prost-build 0.13.2, prost-derive 0.13.2, prost-types 0.13.2, prost 0.13.2
``` ```
Apache License Apache License
@ -5543,85 +5738,6 @@ limitations under the License.
``` ```
## libcrux-intrinsics 0.0.2-alpha.3, libcrux-ml-kem 0.0.2-alpha.3, libcrux-platform 0.0.2-pre.2, libcrux-sha3 0.0.2-alpha.3
```
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
## boring 4.9.0 ## boring 4.9.0
``` ```
@ -5946,7 +6062,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
``` ```
## dunce 1.0.4 ## dunce 1.0.5
``` ```
Creative Commons Legal Code Creative Commons Legal Code
@ -6165,7 +6281,7 @@ THIS SOFTWARE.
``` ```
## rustls-webpki 0.102.6 ## rustls-webpki 0.102.8
``` ```
Except as otherwise noted, this project is licensed under the following Except as otherwise noted, this project is licensed under the following
@ -6190,7 +6306,7 @@ third-party/chromium/LICENSE.
``` ```
## windows-core 0.52.0, windows-sys 0.45.0, windows-sys 0.52.0, windows-targets 0.42.2, windows-targets 0.52.6, windows_aarch64_msvc 0.42.2, windows_aarch64_msvc 0.52.6, windows_x86_64_gnu 0.52.6, windows_x86_64_msvc 0.42.2, windows_x86_64_msvc 0.52.6 ## windows-core 0.52.0, windows-sys 0.45.0, windows-sys 0.52.0, windows-sys 0.59.0, windows-targets 0.42.2, windows-targets 0.52.6, windows_aarch64_msvc 0.42.2, windows_aarch64_msvc 0.52.6, windows_x86_64_gnu 0.52.6, windows_x86_64_msvc 0.42.2, windows_x86_64_msvc 0.52.6
``` ```
MIT License MIT License
@ -6312,7 +6428,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## core-foundation-sys 0.8.6, core-foundation 0.9.4 ## core-foundation-sys 0.8.7, core-foundation 0.9.4
``` ```
Copyright (c) 2012-2013 Mozilla Foundation Copyright (c) 2012-2013 Mozilla Foundation
@ -6431,7 +6547,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## backtrace 0.3.73, cc 1.1.6, cfg-if 1.0.0, cmake 0.1.48, flate2 1.0.30, jobserver 0.1.32, openssl-probe 0.1.5, rustc-demangle 0.1.24, socket2 0.5.7 ## backtrace 0.3.74, cc 1.1.18, cfg-if 1.0.0, cmake 0.1.48, flate2 1.0.33, jobserver 0.1.32, openssl-probe 0.1.5, rustc-demangle 0.1.24, socket2 0.5.7
``` ```
Copyright (c) 2014 Alex Crichton Copyright (c) 2014 Alex Crichton
@ -6494,7 +6610,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## mio 1.0.1 ## mio 1.0.2
``` ```
Copyright (c) 2014 Carl Lerche and other MIO contributors Copyright (c) 2014 Carl Lerche and other MIO contributors
@ -6582,7 +6698,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## bitflags 2.6.0, glob 0.3.1, log 0.4.22, num-bigint 0.4.6, num-derive 0.4.2, num-integer 0.1.46, num-traits 0.2.19, range-map 0.2.0, regex-automata 0.4.7, regex-syntax 0.8.4, regex 1.10.5 ## bitflags 2.6.0, glob 0.3.1, log 0.4.22, num-bigint 0.4.6, num-derive 0.4.2, num-integer 0.1.46, num-traits 0.2.19, range-map 0.2.0, regex-automata 0.4.7, regex-syntax 0.8.4, regex 1.10.6
``` ```
Copyright (c) 2014 The Rust Project Developers Copyright (c) 2014 The Rust Project Developers
@ -6671,7 +6787,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
``` ```
## libc 0.2.155 ## libc 0.2.158
``` ```
Copyright (c) 2014-2020 The Rust Project Developers Copyright (c) 2014-2020 The Rust Project Developers
@ -6783,7 +6899,7 @@ THE SOFTWARE.
``` ```
## anstyle-wincon 3.0.3 ## anstyle-wincon 3.0.4
``` ```
Copyright (c) 2015 Josh Triplett, 2022 The rust-cli Developers Copyright (c) 2015 Josh Triplett, 2022 The rust-cli Developers
@ -6808,7 +6924,7 @@ SOFTWARE.
``` ```
## tempfile 3.10.1 ## tempfile 3.12.0
``` ```
Copyright (c) 2015 Steven Allen Copyright (c) 2015 Steven Allen
@ -6839,7 +6955,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## object 0.36.2 ## object 0.36.4
``` ```
Copyright (c) 2015 The Gimli Developers Copyright (c) 2015 The Gimli Developers
@ -6870,7 +6986,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## gimli 0.29.0, heck 0.4.1, heck 0.5.0, peeking_take_while 0.1.2, unicode-bidi 0.3.15, unicode-normalization 0.1.23 ## gimli 0.31.0, heck 0.5.0, peeking_take_while 0.1.2, unicode-bidi 0.3.15, unicode-normalization 0.1.23
``` ```
Copyright (c) 2015 The Rust Project Developers Copyright (c) 2015 The Rust Project Developers
@ -6976,7 +7092,7 @@ THE SOFTWARE.
``` ```
## schannel 0.1.23 ## schannel 0.1.24
``` ```
Copyright (c) 2015 steffengy Copyright (c) 2015 steffengy
@ -7249,7 +7365,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## hashbrown 0.12.3, hashbrown 0.14.5 ## hashbrown 0.14.5
``` ```
Copyright (c) 2016 Amanieu d'Antras Copyright (c) 2016 Amanieu d'Antras
@ -7311,7 +7427,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## anstyle-parse 0.2.4 ## anstyle-parse 0.2.5
``` ```
Copyright (c) 2016 Joe Wilm and individual contributors Copyright (c) 2016 Joe Wilm and individual contributors
@ -7342,7 +7458,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## rustls-native-certs 0.7.1, rustls-pemfile 2.1.2, rustls 0.23.12 ## rustls-native-certs 0.7.3, rustls-pemfile 2.1.3, rustls 0.23.13
``` ```
Copyright (c) 2016 Joseph Birr-Pixton <jpixton@gmail.com> Copyright (c) 2016 Joseph Birr-Pixton <jpixton@gmail.com>
@ -7404,7 +7520,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## rustc_version 0.4.0 ## rustc_version 0.4.1
``` ```
Copyright (c) 2016 The Rust Project Developers Copyright (c) 2016 The Rust Project Developers
@ -7555,7 +7671,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## indexmap 1.9.3, indexmap 2.2.6 ## indexmap 2.5.0
``` ```
Copyright (c) 2016--2017 Copyright (c) 2016--2017
@ -7617,7 +7733,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## addr2line 0.22.0 ## addr2line 0.24.1
``` ```
Copyright (c) 2016-2018 The gimli Developers Copyright (c) 2016-2018 The gimli Developers
@ -7906,7 +8022,7 @@ SOFTWARE.
``` ```
## h2 0.4.5 ## h2 0.4.6
``` ```
Copyright (c) 2017 h2 authors Copyright (c) 2017 h2 authors
@ -8031,7 +8147,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## bytes 1.6.1 ## bytes 1.7.1
``` ```
Copyright (c) 2018 Carl Lerche Copyright (c) 2018 Carl Lerche
@ -8458,7 +8574,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## protobuf-codegen 3.4.0, protobuf-json-mapping 3.4.0, protobuf-parse 3.4.0, protobuf-support 3.4.0, protobuf 3.4.0 ## protobuf-codegen 3.5.1, protobuf-json-mapping 3.5.1, protobuf-support 3.5.1, protobuf 3.5.1
``` ```
Copyright (c) 2019 Stepan Koltsov Copyright (c) 2019 Stepan Koltsov
@ -8480,9 +8596,72 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE. OR OTHER DEALINGS IN THE SOFTWARE.
``` ```
## ppv-lite86 0.2.17 ## protobuf-parse 3.5.1
```
Copyright (c) 2019 Stepan Koltsov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
-----
The following applies to src/proto/google/
Copyright 2008 Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.
```
## ppv-lite86 0.2.20
``` ```
Copyright (c) 2019 The CryptoCorrosion Contributors Copyright (c) 2019 The CryptoCorrosion Contributors
@ -8793,7 +8972,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## cpufeatures 0.2.12 ## cpufeatures 0.2.14
``` ```
Copyright (c) 2020 The RustCrypto Project Developers Copyright (c) 2020 The RustCrypto Project Developers
@ -8824,7 +9003,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## memmap2 0.9.4 ## memmap2 0.9.5
``` ```
Copyright (c) 2020 Yevhenii Reizner Copyright (c) 2020 Yevhenii Reizner
@ -9006,7 +9185,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## anstyle 1.0.7 ## anstyle 1.0.8
``` ```
Copyright (c) 2022 The rust-cli Developers Copyright (c) 2022 The rust-cli Developers
@ -9056,7 +9235,7 @@ SOFTWARE.
``` ```
## rustls-pki-types 1.7.0 ## rustls-pki-types 1.8.0
``` ```
Copyright (c) 2023 Dirkjan Ochtman <dirkjan@ochtman.nl> Copyright (c) 2023 Dirkjan Ochtman <dirkjan@ochtman.nl>
@ -9137,7 +9316,7 @@ SOFTWARE.
``` ```
## hyper-util 0.1.6 ## hyper-util 0.1.8
``` ```
Copyright (c) 2023 Sean McArthur Copyright (c) 2023 Sean McArthur
@ -9162,37 +9341,6 @@ THE SOFTWARE.
``` ```
## tokio-stream 0.1.15, tokio-util 0.7.11
```
Copyright (c) 2023 Tokio Contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
```
## time 0.3.36 ## time 0.3.36
``` ```
@ -9218,7 +9366,7 @@ SOFTWARE.
``` ```
## anstream 0.6.14, anstyle-query 1.1.0, clap 4.4.18, colorchoice 1.0.1, env_filter 0.1.1, env_logger 0.11.4, is_terminal_polyfill 1.70.0, toml_datetime 0.6.6, toml_edit 0.21.1 ## anstream 0.6.15, anstyle-query 1.1.1, clap 4.5.17, colorchoice 1.0.2, env_filter 0.1.2, env_logger 0.11.5, is_terminal_polyfill 1.70.1, toml_datetime 0.6.8, toml_edit 0.22.20
``` ```
Copyright (c) Individual contributors Copyright (c) Individual contributors
@ -9255,7 +9403,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
``` ```
## arrayvec 0.7.4 ## arrayvec 0.7.6
``` ```
Copyright (c) Ulrik Sverdrup "bluss" 2015-2023 Copyright (c) Ulrik Sverdrup "bluss" 2015-2023
@ -9381,7 +9529,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## breakpad-symbols 0.20.0, minidump-common 0.20.0, minidump-processor 0.20.0, minidump-unwind 0.20.0, minidump 0.20.0 ## breakpad-symbols 0.21.2, minidump-common 0.21.2, minidump-processor 0.21.2, minidump-unwind 0.21.2, minidump 0.21.2
``` ```
MIT License MIT License
@ -9462,7 +9610,7 @@ SOFTWARE.
``` ```
## miniz_oxide 0.7.4 ## miniz_oxide 0.8.0
``` ```
MIT License MIT License
@ -9921,7 +10069,7 @@ SOFTWARE.
``` ```
## cachemap2 0.2.0 ## cachemap2 0.3.0
``` ```
MIT License MIT License
@ -9948,7 +10096,7 @@ SOFTWARE.
``` ```
## rustls-platform-verifier-android 0.1.0, rustls-platform-verifier 0.3.2 ## rustls-platform-verifier-android 0.1.1, rustls-platform-verifier 0.3.4
``` ```
MIT License MIT License
@ -9990,7 +10138,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
``` ```
## tokio 1.39.1 ## tokio-stream 0.1.16, tokio-util 0.7.12, tokio 1.40.0
``` ```
MIT License MIT License
@ -10101,7 +10249,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## curve25519-dalek-derive 0.1.1, adler 1.0.2, anyhow 1.0.86, async-trait 0.1.81, atomic-waker 1.1.2, displaydoc 0.2.5, dyn-clone 1.0.17, fastrand 2.1.0, home 0.5.9, itoa 1.0.11, linkme-impl 0.3.27, linkme 0.3.27, linux-raw-sys 0.4.14, minimal-lexical 0.2.1, num_enum 0.7.2, num_enum_derive 0.7.2, once_cell 1.19.0, paste 1.0.15, pin-project-lite 0.2.14, prettyplease 0.2.20, proc-macro-crate 3.1.0, proc-macro2 1.0.86, quote 1.0.36, rustc-hash 1.1.0, rustix 0.38.34, rustversion 1.0.17, semver 1.0.23, send_wrapper 0.6.0, serde 1.0.204, serde_derive 1.0.204, serde_json 1.0.120, syn-mid 0.6.0, syn 1.0.109, syn 2.0.72, thiserror-impl 1.0.63, thiserror 1.0.63, unicode-ident 1.0.12, utf-8 0.7.6 ## curve25519-dalek-derive 0.1.1, adler2 2.0.0, anyhow 1.0.88, async-trait 0.1.82, atomic-waker 1.1.2, displaydoc 0.2.5, dyn-clone 1.0.17, fastrand 2.1.1, home 0.5.9, itoa 1.0.11, linkme-impl 0.3.28, linkme 0.3.28, linux-raw-sys 0.4.14, minimal-lexical 0.2.1, num_enum 0.7.3, num_enum_derive 0.7.3, once_cell 1.19.0, paste 1.0.15, pin-project-lite 0.2.14, prettyplease 0.2.22, proc-macro-crate 3.2.0, proc-macro2 1.0.86, quote 1.0.37, rustc-hash 1.1.0, rustix 0.38.37, rustversion 1.0.17, semver 1.0.23, send_wrapper 0.6.0, serde 1.0.210, serde_derive 1.0.210, serde_json 1.0.128, syn-mid 0.6.0, syn 1.0.109, syn 2.0.77, thiserror-impl 1.0.63, thiserror 1.0.63, unicode-ident 1.0.13, utf-8 0.7.6
``` ```
Permission is hereby granted, free of charge, to any Permission is hereby granted, free of charge, to any
@ -10130,7 +10278,7 @@ DEALINGS IN THE SOFTWARE.
``` ```
## winnow 0.5.40 ## winnow 0.6.18
``` ```
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
@ -10270,7 +10418,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
``` ```
## base64 0.21.7, base64 0.22.1 ## base64 0.22.1
``` ```
The MIT License (MIT) The MIT License (MIT)
@ -10324,7 +10472,7 @@ THE SOFTWARE.
``` ```
## strsim 0.10.0 ## strsim 0.10.0, strsim 0.11.1
``` ```
The MIT License (MIT) The MIT License (MIT)
@ -10462,7 +10610,7 @@ SOFTWARE.
``` ```
## clap_builder 4.4.18, clap_derive 4.4.7, clap_lex 0.6.0 ## clap_builder 4.5.17, clap_derive 4.5.13, clap_lex 0.7.2
``` ```
The MIT License (MIT) The MIT License (MIT)
@ -10570,7 +10718,7 @@ SOFTWARE.
``` ```
## same-file 1.0.6, winapi-util 0.1.8 ## same-file 1.0.6, winapi-util 0.1.9
``` ```
The MIT License (MIT) The MIT License (MIT)
@ -10745,7 +10893,7 @@ SOFTWARE.
``` ```
## version_check 0.9.4 ## version_check 0.9.5
``` ```
The MIT License (MIT) The MIT License (MIT)
@ -10881,7 +11029,7 @@ SOFTWARE.
*/ */
``` ```
## unicode-ident 1.0.12 ## unicode-ident 1.0.13
``` ```
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE

8
package-lock.json generated
View file

@ -21,7 +21,7 @@
"@react-aria/utils": "3.16.0", "@react-aria/utils": "3.16.0",
"@react-spring/web": "9.5.5", "@react-spring/web": "9.5.5",
"@signalapp/better-sqlite3": "8.8.1", "@signalapp/better-sqlite3": "8.8.1",
"@signalapp/libsignal-client": "0.57.1", "@signalapp/libsignal-client": "0.58.0",
"@signalapp/ringrtc": "2.47.1", "@signalapp/ringrtc": "2.47.1",
"@types/fabric": "4.5.3", "@types/fabric": "4.5.3",
"backbone": "1.4.0", "backbone": "1.4.0",
@ -7230,9 +7230,9 @@
} }
}, },
"node_modules/@signalapp/libsignal-client": { "node_modules/@signalapp/libsignal-client": {
"version": "0.57.1", "version": "0.58.0",
"resolved": "https://registry.npmjs.org/@signalapp/libsignal-client/-/libsignal-client-0.57.1.tgz", "resolved": "https://registry.npmjs.org/@signalapp/libsignal-client/-/libsignal-client-0.58.0.tgz",
"integrity": "sha512-YD0ddKiFuRyw7wnhDV/038K8tNCW6+mBYFxjxZAnMxatPo4tXhV84cuf36CcR4xbx+++RZQqByPM9r4AxetknQ==", "integrity": "sha512-CXJtNbuODAq6vdF6sJK6yQy9u2qi5NF4r50bvXBYhoKKZngbsgre45rQI6MldpuMVaOuc+LhMprAg5PaoVforQ==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"dependencies": { "dependencies": {

View file

@ -105,7 +105,7 @@
"@react-aria/utils": "3.16.0", "@react-aria/utils": "3.16.0",
"@react-spring/web": "9.5.5", "@react-spring/web": "9.5.5",
"@signalapp/better-sqlite3": "8.8.1", "@signalapp/better-sqlite3": "8.8.1",
"@signalapp/libsignal-client": "0.57.1", "@signalapp/libsignal-client": "0.58.0",
"@signalapp/ringrtc": "2.47.1", "@signalapp/ringrtc": "2.47.1",
"@types/fabric": "4.5.3", "@types/fabric": "4.5.3",
"backbone": "1.4.0", "backbone": "1.4.0",

View file

@ -192,8 +192,8 @@ message Group {
bytes userId = 1; bytes userId = 1;
Role role = 2; Role role = 2;
bytes profileKey = 3; reserved /*profileKey*/ 3; // This field is ignored in Backups, in favor of Contact frames for members
reserved /*presentation*/ 4; // The field is deprecated in the context of static group state reserved /*presentation*/ 4; // This field is deprecated in the context of static group state
uint32 joinedAtVersion = 5; uint32 joinedAtVersion = 5;
} }
@ -205,8 +205,8 @@ message Group {
message MemberPendingAdminApproval { message MemberPendingAdminApproval {
bytes userId = 1; bytes userId = 1;
bytes profileKey = 2; reserved /*profileKey*/ 2; // This field is ignored in Backups, in favor of Contact frames for members
reserved /*presentation*/ 3; // The field is deprecated in the context of static group state reserved /*presentation*/ 3; // This field is deprecated in the context of static group state
uint64 timestamp = 4; uint64 timestamp = 4;
} }
@ -1137,6 +1137,8 @@ message ChatStyle {
oneof wallpaper { oneof wallpaper {
WallpaperPreset wallpaperPreset = 1; WallpaperPreset wallpaperPreset = 1;
// This `FilePointer` is expected not to contain a `fileName`, `width`,
// `height`, or `caption`.
FilePointer wallpaperPhoto = 2; FilePointer wallpaperPhoto = 2;
} }

View file

@ -2131,6 +2131,10 @@ export async function startApp(): Promise<void> {
async function onConfiguration(ev: ConfigurationEvent): Promise<void> { async function onConfiguration(ev: ConfigurationEvent): Promise<void> {
ev.confirm(); ev.confirm();
if (window.SignalCI?.isBackupIntegration) {
return;
}
const { configuration } = ev; const { configuration } = ev;
const { const {
readReceipts, readReceipts,
@ -3196,6 +3200,10 @@ export async function startApp(): Promise<void> {
async function onKeysSync(ev: KeysEvent) { async function onKeysSync(ev: KeysEvent) {
ev.confirm(); ev.confirm();
if (window.SignalCI?.isBackupIntegration) {
return;
}
const { masterKey } = ev; const { masterKey } = ev;
let { storageServiceKey } = ev; let { storageServiceKey } = ev;

View file

@ -75,11 +75,13 @@ const getCommonProps = (options: {
callId: '123', callId: '123',
peerId: conversation.id, peerId: conversation.id,
ringerId: callCreator?.serviceId ?? null, ringerId: callCreator?.serviceId ?? null,
startedById: null,
mode, mode,
type, type,
direction, direction,
timestamp: Date.now(), timestamp: Date.now(),
status, status,
endedTimestamp: null,
}, },
callCreator, callCreator,
activeConversationId: options.activeConversationId ?? null, activeConversationId: options.activeConversationId ?? null,

View file

@ -142,8 +142,6 @@ const FLUSH_TIMEOUT = 30 * MINUTE;
// Threshold for reporting slow flushes // Threshold for reporting slow flushes
const REPORTING_THRESHOLD = SECOND; const REPORTING_THRESHOLD = SECOND;
const ZERO_PROFILE_KEY = new Uint8Array(32);
type GetRecipientIdOptionsType = type GetRecipientIdOptionsType =
| Readonly<{ | Readonly<{
serviceId: ServiceIdString; serviceId: ServiceIdString;
@ -874,15 +872,9 @@ export class BackupExportStream extends Readable {
accessControl: convo.accessControl, accessControl: convo.accessControl,
version: convo.revision || 0, version: convo.revision || 0,
members: convo.membersV2?.map(member => { members: convo.membersV2?.map(member => {
const memberConvo = window.ConversationController.get(member.aci);
const { profileKey } = memberConvo?.attributes ?? {};
return { return {
userId: this.aciToBytes(member.aci), userId: this.aciToBytes(member.aci),
role: member.role, role: member.role,
profileKey: profileKey
? Bytes.fromBase64(profileKey)
: ZERO_PROFILE_KEY,
joinedAtVersion: member.joinedAtVersion, joinedAtVersion: member.joinedAtVersion,
}; };
}), }),
@ -891,7 +883,6 @@ export class BackupExportStream extends Readable {
member: { member: {
userId: this.serviceIdToBytes(member.serviceId), userId: this.serviceIdToBytes(member.serviceId),
role: member.role, role: member.role,
profileKey: null,
joinedAtVersion: 0, joinedAtVersion: 0,
}, },
addedByUserId: this.aciToBytes(member.addedByUserId), addedByUserId: this.aciToBytes(member.addedByUserId),
@ -900,13 +891,8 @@ export class BackupExportStream extends Readable {
}), }),
membersPendingAdminApproval: convo.pendingAdminApprovalV2?.map( membersPendingAdminApproval: convo.pendingAdminApprovalV2?.map(
member => { member => {
const memberConvo = window.ConversationController.get(member.aci);
const { profileKey } = memberConvo?.attributes ?? {};
return { return {
userId: this.aciToBytes(member.aci), userId: this.aciToBytes(member.aci),
profileKey: profileKey
? Bytes.fromBase64(profileKey)
: ZERO_PROFILE_KEY,
timestamp: getSafeLongFromTimestamp(member.timestamp), timestamp: getSafeLongFromTimestamp(member.timestamp),
}; };
} }
@ -1254,7 +1240,7 @@ export class BackupExportStream extends Readable {
return { kind: NonBubbleResultKind.Drop }; return { kind: NonBubbleResultKind.Drop };
} }
const { ringerId } = callHistory; const { ringerId, startedById } = callHistory;
if (ringerId) { if (ringerId) {
const ringerConversation = const ringerConversation =
window.ConversationController.get(ringerId); window.ConversationController.get(ringerId);
@ -1268,13 +1254,28 @@ export class BackupExportStream extends Readable {
ringerConversation.attributes ringerConversation.attributes
); );
groupCall.ringerRecipientId = recipientId; groupCall.ringerRecipientId = recipientId;
}
if (startedById) {
const startedByConvo = window.ConversationController.get(startedById);
if (!startedByConvo) {
throw new Error(
'toChatItemUpdate/callHistory: startedById conversation not found!'
);
}
const recipientId = this.getRecipientId(startedByConvo.attributes);
groupCall.startedCallRecipientId = recipientId; groupCall.startedCallRecipientId = recipientId;
} }
groupCall.callId = Long.fromString(callId); groupCall.callId = Long.fromString(callId);
groupCall.state = toGroupCallStateProto(callHistory.status); groupCall.state = toGroupCallStateProto(callHistory.status);
groupCall.startedCallTimestamp = Long.fromNumber(callHistory.timestamp); groupCall.startedCallTimestamp = Long.fromNumber(callHistory.timestamp);
groupCall.endedCallTimestamp = Long.fromNumber(0); if (callHistory.endedTimestamp != null) {
groupCall.endedCallTimestamp = Long.fromNumber(
callHistory.endedTimestamp
);
}
groupCall.read = message.seenStatus === SeenStatus.Seen; groupCall.read = message.seenStatus === SeenStatus.Seen;
updateMessage.groupCall = groupCall; updateMessage.groupCall = groupCall;

View file

@ -2074,16 +2074,20 @@ export class BackupImportStream extends Writable {
const { const {
callId: callIdLong, callId: callIdLong,
state, state,
ringerRecipientId, ringerRecipientId: ringerRecipientIdLong,
startedCallRecipientId, startedCallRecipientId: startedCallRecipientIdLong,
startedCallTimestamp, startedCallTimestamp,
endedCallTimestamp,
read, read,
} = updateMessage.groupCall; } = updateMessage.groupCall;
const initiator = const ringerRecipientId = ringerRecipientIdLong?.toNumber();
ringerRecipientId?.toNumber() || startedCallRecipientId?.toNumber(); const startedCallRecipientId = startedCallRecipientIdLong?.toNumber();
const ringer = isNumber(initiator) const ringer = isNumber(ringerRecipientId)
? this.recipientIdToConvo.get(initiator) ? this.recipientIdToConvo.get(ringerRecipientId)
: undefined;
const startedBy = isNumber(startedCallRecipientId)
? this.recipientIdToConvo.get(startedCallRecipientId)
: undefined; : undefined;
if (!callIdLong) { if (!callIdLong) {
@ -2101,9 +2105,13 @@ export class BackupImportStream extends Writable {
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
ringerId: ringer?.serviceId ?? null, ringerId: ringer?.serviceId ?? null,
startedById: isAciString(startedBy?.serviceId)
? startedBy.serviceId
: null,
peerId: groupId, peerId: groupId,
direction: isRingerMe ? CallDirection.Outgoing : CallDirection.Incoming, direction: isRingerMe ? CallDirection.Outgoing : CallDirection.Incoming,
timestamp: startedCallTimestamp.toNumber(), timestamp: startedCallTimestamp.toNumber(),
endedTimestamp: endedCallTimestamp?.toNumber() || null,
}; };
await this.saveCallHistory(callHistory); await this.saveCallHistory(callHistory);
@ -2154,9 +2162,11 @@ export class BackupImportStream extends Writable {
mode: CallMode.Direct, mode: CallMode.Direct,
type: fromIndividualCallTypeProto(type), type: fromIndividualCallTypeProto(type),
ringerId, ringerId,
startedById: null,
peerId, peerId,
direction, direction,
timestamp: startedCallTimestamp.toNumber(), timestamp: startedCallTimestamp.toNumber(),
endedTimestamp: null,
}; };
await this.saveCallHistory(callHistory); await this.saveCallHistory(callHistory);
@ -2913,11 +2923,13 @@ export class BackupImportStream extends Writable {
callId, callId,
peerId: callLink.roomId, peerId: callLink.roomId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
direction: CallDirection.Unknown, direction: CallDirection.Unknown,
timestamp: callTimestamp.toNumber(), timestamp: callTimestamp.toNumber(),
status: fromAdHocCallStateProto(state), status: fromAdHocCallStateProto(state),
endedTimestamp: null,
}; };
await this.saveCallHistory(callHistory); await this.saveCallHistory(callHistory);

View file

@ -2816,7 +2816,7 @@ export class CallingClass {
const callId = getCallIdFromRing(ringId); const callId = getCallIdFromRing(ringId);
const callDetails = getCallDetailsFromGroupCallMeta(groupId, { const callDetails = getCallDetailsFromGroupCallMeta(groupId, {
callId, callId,
ringerId: ringerUuid, ringerId: ringerAci,
}); });
let localEventForCall; let localEventForCall;
if (localEventFromRing === LocalCallEvent.Missed) { if (localEventFromRing === LocalCallEvent.Missed) {

View file

@ -229,6 +229,10 @@ async function doContactSync({
} }
export async function onContactSync(ev: ContactSyncEvent): Promise<void> { export async function onContactSync(ev: ContactSyncEvent): Promise<void> {
if (window.SignalCI?.isBackupIntegration) {
return;
}
log.info( log.info(
`onContactSync(sent=${ev.sentAt}, receivedAt=${ev.receivedAtCounter}): queueing sync` `onContactSync(sent=${ev.sentAt}, receivedAt=${ev.receivedAtCounter}): queueing sync`
); );

View file

@ -4181,20 +4181,24 @@ function saveCallHistory(
callId, callId,
peerId, peerId,
ringerId, ringerId,
startedById,
mode, mode,
type, type,
direction, direction,
status, status,
timestamp timestamp,
endedTimestamp
) VALUES ( ) VALUES (
${callHistory.callId}, ${callHistory.callId},
${callHistory.peerId}, ${callHistory.peerId},
${callHistory.ringerId}, ${callHistory.ringerId},
${callHistory.startedById},
${callHistory.mode}, ${callHistory.mode},
${callHistory.type}, ${callHistory.type},
${callHistory.direction}, ${callHistory.direction},
${callHistory.status}, ${callHistory.status},
${callHistory.timestamp} ${callHistory.timestamp},
${callHistory.endedTimestamp}
); );
`; `;

View file

@ -0,0 +1,30 @@
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { Database } from '@signalapp/better-sqlite3';
import type { LoggerType } from '../../types/Logging';
export const version = 1210;
export function updateToSchemaVersion1210(
currentVersion: number,
db: Database,
logger: LoggerType
): void {
if (currentVersion >= 1210) {
return;
}
db.transaction(() => {
// The standard getNextAttachmentDownloadJobs query uses active & source conditions,
// ordered by received_at
db.exec(`
ALTER TABLE callsHistory
ADD COLUMN startedById TEXT DEFAULT NULL;
ALTER TABLE callsHistory
ADD COLUMN endedTimestamp INTEGER DEFAULT NULL;
`);
db.pragma('user_version = 1210');
})();
logger.info('updateToSchemaVersion1210: success!');
}

View file

@ -171,6 +171,10 @@ function convertLegacyCallDetails(
direction, direction,
status, status,
timestamp, timestamp,
// Not present at the time of this migration
startedById: null,
endedTimestamp: null,
}; };
const result = callHistoryDetailsSchema.safeParse(callHistory); const result = callHistoryDetailsSchema.safeParse(callHistory);

View file

@ -96,10 +96,11 @@ import { updateToSchemaVersion1160 } from './1160-optimize-calls-unread-count';
import { updateToSchemaVersion1170 } from './1170-update-call-history-unread-index'; import { updateToSchemaVersion1170 } from './1170-update-call-history-unread-index';
import { updateToSchemaVersion1180 } from './1180-add-attachment-download-source'; import { updateToSchemaVersion1180 } from './1180-add-attachment-download-source';
import { updateToSchemaVersion1190 } from './1190-call-links-storage'; import { updateToSchemaVersion1190 } from './1190-call-links-storage';
import { updateToSchemaVersion1200 } from './1200-attachment-download-source-index';
import { import {
updateToSchemaVersion1200, updateToSchemaVersion1210,
version as MAX_VERSION, version as MAX_VERSION,
} from './1200-attachment-download-source-index'; } from './1210-call-history-started-id';
function updateToSchemaVersion1( function updateToSchemaVersion1(
currentVersion: number, currentVersion: number,
@ -2063,7 +2064,9 @@ export const SCHEMA_VERSIONS = [
updateToSchemaVersion1170, updateToSchemaVersion1170,
updateToSchemaVersion1180, updateToSchemaVersion1180,
updateToSchemaVersion1190, updateToSchemaVersion1190,
updateToSchemaVersion1200, updateToSchemaVersion1200,
updateToSchemaVersion1210,
]; ];
export class DBVersionFromFutureError extends Error { export class DBVersionFromFutureError extends Error {

View file

@ -33,10 +33,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: GroupCallStatus.Joined, status: GroupCallStatus.Joined,
}, },
callCreator, callCreator,
@ -62,10 +64,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Outgoing, direction: CallDirection.Outgoing,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: GroupCallStatus.Joined, status: GroupCallStatus.Joined,
}, },
callCreator, callCreator,
@ -91,10 +95,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: GroupCallStatus.Declined, status: GroupCallStatus.Declined,
}, },
callCreator, callCreator,
@ -120,10 +126,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now() - HOUR, timestamp: Date.now() - HOUR,
endedTimestamp: null,
status: GroupCallStatus.Joined, status: GroupCallStatus.Joined,
}, },
callCreator, callCreator,
@ -149,10 +157,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now() - HOUR, timestamp: Date.now() - HOUR,
endedTimestamp: null,
status: GroupCallStatus.Missed, status: GroupCallStatus.Missed,
}, },
callCreator, callCreator,
@ -178,10 +188,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Outgoing, direction: CallDirection.Outgoing,
timestamp: Date.now() - HOUR, timestamp: Date.now() - HOUR,
endedTimestamp: null,
status: GroupCallStatus.Joined, status: GroupCallStatus.Joined,
}, },
callCreator, callCreator,
@ -209,10 +221,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: GroupCallStatus.Ringing, status: GroupCallStatus.Ringing,
}, },
callCreator, callCreator,
@ -241,10 +255,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: GroupCallStatus.Ringing, status: GroupCallStatus.Ringing,
}, },
callCreator, callCreator,
@ -272,10 +288,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: callCreator.serviceId ?? null, ringerId: callCreator.serviceId ?? null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Outgoing, direction: CallDirection.Outgoing,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: GroupCallStatus.Ringing, status: GroupCallStatus.Ringing,
}, },
callCreator, callCreator,
@ -300,10 +318,12 @@ describe('calling notification helpers', () => {
callId: '123', callId: '123',
peerId: getPeerIdFromConversation(getDefaultGroup()), peerId: getPeerIdFromConversation(getDefaultGroup()),
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Outgoing, direction: CallDirection.Outgoing,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: GroupCallStatus.Ringing, status: GroupCallStatus.Ringing,
}, },
callCreator: null, callCreator: null,

View file

@ -96,11 +96,13 @@ describe('backup/calling', () => {
callId, callId,
peerId: CONTACT_A, peerId: CONTACT_A,
ringerId: CONTACT_A, ringerId: CONTACT_A,
startedById: null,
mode: CallMode.Direct, mode: CallMode.Direct,
type: CallType.Audio, type: CallType.Audio,
status: DirectCallStatus.Missed, status: DirectCallStatus.Missed,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: now, timestamp: now,
endedTimestamp: null,
}; };
await DataWriter.saveCallHistory(callHistory); await DataWriter.saveCallHistory(callHistory);
await loadAll(); await loadAll();
@ -143,11 +145,13 @@ describe('backup/calling', () => {
callId, callId,
peerId: GROUP_ID_STRING, peerId: GROUP_ID_STRING,
ringerId: CONTACT_A, ringerId: CONTACT_A,
startedById: CONTACT_A,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
status: GroupCallStatus.Declined, status: GroupCallStatus.Declined,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: now, timestamp: now,
endedTimestamp: null,
}; };
await DataWriter.saveCallHistory(callHistory); await DataWriter.saveCallHistory(callHistory);
await loadAll(); await loadAll();
@ -232,11 +236,13 @@ describe('backup/calling', () => {
callId, callId,
peerId: callLink.roomId, peerId: callLink.roomId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
status: AdhocCallStatus.Generic, status: AdhocCallStatus.Generic,
direction: CallDirection.Unknown, direction: CallDirection.Unknown,
timestamp: now, timestamp: now,
endedTimestamp: null,
}; };
await DataWriter.saveCallHistory(callHistory); await DataWriter.saveCallHistory(callHistory);
await loadAll(); await loadAll();
@ -256,11 +262,13 @@ describe('backup/calling', () => {
callId, callId,
peerId: 'nonexistent', peerId: 'nonexistent',
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
status: AdhocCallStatus.Generic, status: AdhocCallStatus.Generic,
direction: CallDirection.Unknown, direction: CallDirection.Unknown,
timestamp: now, timestamp: now,
endedTimestamp: null,
}; };
await DataWriter.saveCallHistory(callHistory); await DataWriter.saveCallHistory(callHistory);
await loadAll(); await loadAll();

View file

@ -83,10 +83,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId: conversationId, peerId: conversationId,
ringerId: generateAci(), ringerId: generateAci(),
startedById: generateAci(),
mode: CallMode.Direct, mode: CallMode.Direct,
type: CallType.Video, type: CallType.Video,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
}; };
} }
@ -118,10 +120,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId: conversationId, peerId: conversationId,
ringerId: generateAci(), ringerId: generateAci(),
startedById: generateAci(),
mode: CallMode.Direct, mode: CallMode.Direct,
type, type,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
}; };
} }
@ -153,10 +157,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId: conversationId, peerId: conversationId,
ringerId: generateAci(), ringerId: generateAci(),
startedById: generateAci(),
mode: CallMode.Direct, mode: CallMode.Direct,
type, type,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
}; };
} }
@ -222,10 +228,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId, peerId,
ringerId: null, ringerId: null,
startedById: null,
mode, mode,
type: CallType.Video, type: CallType.Video,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
}; };
} }
@ -281,10 +289,12 @@ describe('sql/getCallHistoryGroups', () => {
callId: '1', callId: '1',
peerId: conversationId, peerId: conversationId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Direct, mode: CallMode.Direct,
type: CallType.Video, type: CallType.Video,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: now, timestamp: now,
endedTimestamp: null,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
}; };
@ -316,10 +326,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId: conversationId, peerId: conversationId,
ringerId: generateAci(), ringerId: generateAci(),
startedById: generateAci(),
mode: CallMode.Direct, mode: CallMode.Direct,
type, type,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status, status,
}; };
} }
@ -356,10 +368,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId: roomId, peerId: roomId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status: AdhocCallStatus.Joined, status: AdhocCallStatus.Joined,
}; };
} }
@ -418,10 +432,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId: roomId, peerId: roomId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
direction: CallDirection.Outgoing, direction: CallDirection.Outgoing,
timestamp, timestamp,
endedTimestamp: null,
status: AdhocCallStatus.Joined, status: AdhocCallStatus.Joined,
}; };
} }
@ -436,10 +452,12 @@ describe('sql/getCallHistoryGroups', () => {
callId, callId,
peerId, peerId,
ringerId: null, ringerId: null,
startedById: null,
mode, mode,
type: CallType.Video, type: CallType.Video,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
}; };
} }
@ -510,10 +528,12 @@ describe('sql/getCallHistoryGroupsCount', () => {
callId, callId,
peerId: conversationId, peerId: conversationId,
ringerId: generateAci(), ringerId: generateAci(),
startedById: generateAci(),
mode: CallMode.Direct, mode: CallMode.Direct,
type, type,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
}; };
} }
@ -547,10 +567,12 @@ describe('sql/getCallHistoryGroupsCount', () => {
callId, callId,
peerId: roomId, peerId: roomId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
direction: CallDirection.Outgoing, direction: CallDirection.Outgoing,
timestamp, timestamp,
endedTimestamp: null,
status: AdhocCallStatus.Joined, status: AdhocCallStatus.Joined,
}; };
} }

View file

@ -40,10 +40,12 @@ describe('sql/getRecentStaleRingsAndMarkOlderMissed', () => {
callId, callId,
peerId, peerId,
ringerId: generateAci(), ringerId: generateAci(),
startedById: generateAci(),
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp, timestamp,
endedTimestamp: null,
status, status,
}; };
await saveCallHistory(call); await saveCallHistory(call);

View file

@ -20,7 +20,8 @@ describe('SQL/updateToSchemaVersion1100', () => {
beforeEach(() => { beforeEach(() => {
db = createDB(); db = createDB();
// index updated in 1170 // index updated in 1170
updateToVersion(db, 1170); // columns updated in 1210
updateToVersion(db, 1210);
}); });
afterEach(() => { afterEach(() => {

View file

@ -153,7 +153,13 @@ describe('SQL/updateToSchemaVersion89', () => {
.prepare(selectHistoryQuery) .prepare(selectHistoryQuery)
.all() .all()
.map(row => { .map(row => {
return callHistoryDetailsSchema.parse(row); return callHistoryDetailsSchema.parse({
...row,
// Not present at the time of migration, but required by zod
startedById: null,
endedTimestamp: null,
});
}); });
} }
@ -451,6 +457,10 @@ describe('SQL/updateToSchemaVersion89', () => {
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
status: DirectCallStatus.Accepted, status: DirectCallStatus.Accepted,
timestamp: Date.now(), timestamp: Date.now(),
// Not present at the time of migration
startedById: null,
endedTimestamp: null,
}); });
insertCallHistory({ insertCallHistory({
callId: 'abc', callId: 'abc',
@ -461,6 +471,10 @@ describe('SQL/updateToSchemaVersion89', () => {
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
status: GroupCallStatus.Accepted, status: GroupCallStatus.Accepted,
timestamp: Date.now(), timestamp: Date.now(),
// Not present at the time of migration
startedById: null,
endedTimestamp: null,
}); });
updateToVersion(db, 89); updateToVersion(db, 89);
@ -487,6 +501,10 @@ describe('SQL/updateToSchemaVersion89', () => {
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
status: DirectCallStatus.Pending, status: DirectCallStatus.Pending,
timestamp: Date.now() - 1000, timestamp: Date.now() - 1000,
// Not present at the time of migration
startedById: null,
endedTimestamp: null,
}); });
createCallHistoryMessage({ createCallHistoryMessage({

View file

@ -117,10 +117,12 @@ export type CallDetails = Readonly<{
callId: string; callId: string;
peerId: AciString | string; peerId: AciString | string;
ringerId: AciString | string | null; ringerId: AciString | string | null;
startedById: AciString | string | null;
mode: CallMode; mode: CallMode;
type: CallType; type: CallType;
direction: CallDirection; direction: CallDirection;
timestamp: number; timestamp: number;
endedTimestamp: number | null;
}>; }>;
export type CallLogEventTarget = Readonly<{ export type CallLogEventTarget = Readonly<{
@ -147,7 +149,10 @@ export type CallHistoryDetails = CallDetails &
status: CallStatus; status: CallStatus;
}>; }>;
export type CallHistoryGroup = Omit<CallHistoryDetails, 'callId' | 'ringerId'> & export type CallHistoryGroup = Omit<
CallHistoryDetails,
'callId' | 'ringerId' | 'startedById' | 'endedTimestamp'
> &
Readonly<{ Readonly<{
children: ReadonlyArray<{ children: ReadonlyArray<{
callId: string; callId: string;
@ -200,10 +205,12 @@ export const callDetailsSchema = z.object({
callId: z.string(), callId: z.string(),
peerId: z.string(), peerId: z.string(),
ringerId: ringerIdSchema, ringerId: ringerIdSchema,
startedById: aciSchema.or(z.null()),
mode: callModeSchema, mode: callModeSchema,
type: callTypeSchema, type: callTypeSchema,
direction: callDirectionSchema, direction: callDirectionSchema,
timestamp: z.number(), timestamp: z.number(),
endedTimestamp: z.number().or(z.null()),
}) satisfies z.ZodType<CallDetails>; }) satisfies z.ZodType<CallDetails>;
export const callEventDetailsSchema = callDetailsSchema.extend({ export const callEventDetailsSchema = callDetailsSchema.extend({

View file

@ -169,7 +169,7 @@ export async function createPacksFromBackup(
id, id,
key, key,
status: 'known' as const, status: 'installed' as const,
}) })
); );
@ -187,11 +187,15 @@ export async function getStickerPacksForBackup(): Promise<
const uninstalled = new Set( const uninstalled = new Set(
(await DataReader.getUninstalledStickerPacks()).map(({ id }) => id) (await DataReader.getUninstalledStickerPacks()).map(({ id }) => id)
); );
for (const { id, key } of stickerPacks) { for (const { id, key, status } of stickerPacks) {
if (uninstalled.has(id)) { if (uninstalled.has(id)) {
continue; continue;
} }
if (status === 'known' || status === 'ephemeral') {
continue;
}
result.push({ id, key }); result.push({ id, key });
} }
return result; return result;

View file

@ -87,17 +87,27 @@ export function formatCallEvent(callEvent: CallEventDetails): string {
type, type,
mode, mode,
ringerId, ringerId,
startedById,
timestamp, timestamp,
} = callEvent; } = callEvent;
const peerIdLog = peerIdToLog(peerId, mode); const peerIdLog = peerIdToLog(peerId, mode);
return `CallEvent (${callId}, ${peerIdLog}, ${mode}, ${event}, ${direction}, ${type}, ${mode}, ${timestamp}, ${ringerId}, ${eventSource})`; return `CallEvent (${callId}, ${peerIdLog}, ${mode}, ${event}, ${direction}, ${type}, ${mode}, ${timestamp}, ${ringerId}, ${startedById}, ${eventSource})`;
} }
export function formatCallHistory(callHistory: CallHistoryDetails): string { export function formatCallHistory(callHistory: CallHistoryDetails): string {
const { callId, peerId, direction, status, type, mode, timestamp, ringerId } = const {
callHistory; callId,
peerId,
direction,
status,
type,
mode,
timestamp,
ringerId,
startedById,
} = callHistory;
const peerIdLog = peerIdToLog(peerId, mode); const peerIdLog = peerIdToLog(peerId, mode);
return `CallHistory (${callId}, ${peerIdLog}, ${mode}, ${status}, ${direction}, ${type}, ${mode}, ${timestamp}, ${ringerId})`; return `CallHistory (${callId}, ${peerIdLog}, ${mode}, ${status}, ${direction}, ${type}, ${mode}, ${timestamp}, ${ringerId}, ${startedById})`;
} }
export function formatCallHistoryGroup( export function formatCallHistoryGroup(
@ -245,6 +255,8 @@ export function getCallEventForProto(
callId, callId,
peerId, peerId,
ringerId: null, ringerId: null,
startedById: null,
endedTimestamp: null,
mode, mode,
type, type,
direction, direction,
@ -493,6 +505,7 @@ export function getCallDetailsFromDirectCall(
? CallDirection.Incoming ? CallDirection.Incoming
: CallDirection.Outgoing, : CallDirection.Outgoing,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
}); });
} }
@ -507,10 +520,12 @@ export function getCallDetailsFromEndedDirectCall(
callId, callId,
peerId, peerId,
ringerId, ringerId,
startedById: ringerId,
mode: CallMode.Direct, mode: CallMode.Direct,
type: wasVideoCall ? CallType.Video : CallType.Audio, type: wasVideoCall ? CallType.Video : CallType.Audio,
direction: getCallDirectionFromRingerId(ringerId), direction: getCallDirectionFromRingerId(ringerId),
timestamp, timestamp,
endedTimestamp: null,
}); });
} }
@ -522,10 +537,12 @@ export function getCallDetailsFromGroupCallMeta(
callId: groupCallMeta.callId, callId: groupCallMeta.callId,
peerId, peerId,
ringerId: groupCallMeta.ringerId, ringerId: groupCallMeta.ringerId,
startedById: groupCallMeta.ringerId,
mode: CallMode.Group, mode: CallMode.Group,
type: CallType.Group, type: CallType.Group,
direction: getCallDirectionFromRingerId(groupCallMeta.ringerId), direction: getCallDirectionFromRingerId(groupCallMeta.ringerId),
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
}); });
} }
@ -537,12 +554,14 @@ export function getCallDetailsForAdhocCall(
callId, callId,
peerId, peerId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
// Direction is only outgoing when your action causes ringing for others. // Direction is only outgoing when your action causes ringing for others.
// As Adhoc calls do not support ringing, this is always incoming for now // As Adhoc calls do not support ringing, this is always incoming for now
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
}); });
} }
@ -564,7 +583,16 @@ export function transitionCallHistory(
callHistory: CallHistoryDetails | null, callHistory: CallHistoryDetails | null,
callEvent: CallEventDetails callEvent: CallEventDetails
): CallHistoryDetails { ): CallHistoryDetails {
const { callId, peerId, ringerId, mode, type, direction, event } = callEvent; const {
callId,
peerId,
ringerId,
startedById,
mode,
type,
direction,
event,
} = callEvent;
if (callHistory != null) { if (callHistory != null) {
strictAssert(callHistory.callId === callId, 'callId must be same'); strictAssert(callHistory.callId === callId, 'callId must be same');
@ -575,6 +603,12 @@ export function transitionCallHistory(
callHistory.ringerId === ringerId, callHistory.ringerId === ringerId,
'ringerId must be same if it exists' 'ringerId must be same if it exists'
); );
strictAssert(
startedById == null ||
callHistory.startedById == null ||
callHistory.startedById === startedById,
'startedById must be same if it exists'
);
strictAssert(callHistory.direction === direction, 'direction must be same'); strictAssert(callHistory.direction === direction, 'direction must be same');
strictAssert(callHistory.type === type, 'type must be same'); strictAssert(callHistory.type === type, 'type must be same');
strictAssert(callHistory.mode === mode, 'mode must be same'); strictAssert(callHistory.mode === mode, 'mode must be same');
@ -614,11 +648,13 @@ export function transitionCallHistory(
callId, callId,
peerId, peerId,
ringerId, ringerId,
startedById,
mode, mode,
type, type,
direction, direction,
timestamp, timestamp,
status, status,
endedTimestamp: null,
}); });
} }

View file

@ -93,10 +93,12 @@ export function toCallHistoryFromUnusedCallLink(
callId: generateUuid(), callId: generateUuid(),
peerId: callLink.roomId, peerId: callLink.roomId,
ringerId: null, ringerId: null,
startedById: null,
mode: CallMode.Adhoc, mode: CallMode.Adhoc,
type: CallType.Adhoc, type: CallType.Adhoc,
direction: CallDirection.Incoming, direction: CallDirection.Incoming,
timestamp: Date.now(), timestamp: Date.now(),
endedTimestamp: null,
status: AdhocCallStatus.Pending, status: AdhocCallStatus.Pending,
}; };
} }