Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deserialization of previous contacts #324

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Schmiddiii
Copy link
Contributor

This caused presage to not load contacts anymore stored from previous versions.

This caused presage to not load contacts anymore stored from previous
versions.
@rubdos
Copy link
Member

rubdos commented Sep 24, 2024

I'm not 100% convinced that this is right: possibly we need to have this as Optional, and actually handle the absence of the timer version? There's quite some migration logic to this field.

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 2.20%. Comparing base (3b8656a) to head (ae03a35).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
libsignal-service/src/models.rs 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3b8656a) and HEAD (ae03a35). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (3b8656a) HEAD (ae03a35)
3 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #324       +/-   ##
==========================================
- Coverage   16.77%   2.20%   -14.58%     
==========================================
  Files          36      34        -2     
  Lines        3111    2540      -571     
==========================================
- Hits          522      56      -466     
+ Misses       2589    2484      -105     
Flag Coverage Δ
2.20% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Schmiddiii
Copy link
Contributor Author

I don't know how exactly timer versions work, but I would expect the only way to handle a missing timer version is to start versioning the timer with version 1.

@rubdos
Copy link
Member

rubdos commented Sep 24, 2024

I'm mostly wondering about what should happen if the timer is unset: should some messages be transmitted to actually trigger the creation of a timer version?

I haven't looked at this yet, but I've added it to my TODOs for my MR for WF: https://gitlab.com/whisperfish/whisperfish/-/merge_requests/627

@Schmiddiii
Copy link
Contributor Author

Looking at the migration Signal Desktop has, they don't seem to ssend any messages.
Just set any future contacts timeouts to 1 and the current timeouts to 2 (not sure why 2, maybe this MR value should also be changed to 2).

@GranPC
Copy link

GranPC commented Sep 24, 2024

From what I learned reading the Signal Android patch (signalapp/Signal-Android@1f196f7#diff-324a17e5ee685f28454fe3086896076f7028a4dbde241922f1b71348cc3692c4R14), they seem to handle it by setting it to 1, unless there an expiration timer is set, in which case they set it to 2.

They also do not handle groups at all. I think expiration timers are not going to be versioned for groups. or at least not for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants