Skip to content

Commit

Permalink
Set DataMessage expiration_timer to None if set to 0 in Contact
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon committed Oct 22, 2024
1 parent 4e3dd4e commit 88f3ffb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ resolver = "2"
[patch.crates-io]
curve25519-dalek = { git = 'https://github.com/signalapp/curve25519-dalek', tag = 'signal-curve25519-4.1.3' }

# [patch."https://github.com/whisperfish/libsignal-service-rs.git"]
# libsignal-service = { path = "../libsignal-service-rs" }
[patch."https://github.com/whisperfish/libsignal-service-rs.git"]
libsignal-service = { path = "../libsignal-service-rs" }
2 changes: 1 addition & 1 deletion presage-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ fn print_message<S: Store>(
Sent(&'a Thread, String),
}

if let Some(msg) = match &content.body {
if let Some(msg) = match &dbg!(content).body {
ContentBody::NullMessage(_) => Some(Msg::Received(
&thread,
"Null message (for example deleted)".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion presage/src/manager/registered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ impl<S: Store> Manager<S, Registered> {
..
}) => {
if timer.is_none() {
*timer = store_expire_timer.map(|(t, _)| t);
*timer = store_expire_timer.map(|(t, _)| t).filter(|t| t > &0);
*version = Some(store_expire_timer.map(|(_, v)| v).unwrap_or_default());
} else {
*version = Some(store_expire_timer.map(|(_, v)| v).unwrap_or_default() + 1);
Expand Down

0 comments on commit 88f3ffb

Please sign in to comment.