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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libsignal-service/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ pub struct Attachment<R> {
pub reader: R,
}

const fn default_expire_timer_version() -> u32 {
2
}

/// Mirror of the protobuf ContactDetails message
/// but with stronger types (e.g. `ServiceAddress` instead of optional uuid and string phone numbers)
/// and some helper functions
Expand All @@ -29,6 +33,7 @@ pub struct Contact {
pub verified: Verified,
pub profile_key: Vec<u8>,
pub expire_timer: u32,
#[serde(default = "default_expire_timer_version")]
pub expire_timer_version: u32,
pub inbox_position: u32,
pub archived: bool,
Expand Down
Loading