Skip to content

Commit

Permalink
Potential fix for expire timer turning off
Browse files Browse the repository at this point in the history
I had the assumption that once an expire timer was set, the field would
always be populated. I think now that this assumption is wrong.
Therefore, one should only update the expire timer if the field is
really set.
  • Loading branch information
Schmiddiii committed Jan 3, 2024
1 parent d884ef6 commit 1484d57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion presage/src/manager/registered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,9 @@ async fn save_message<S: Store>(
store.upsert_profile_key(&sender_uuid, profile_key)?;
}

store.update_expire_timer(&thread, data_message.expire_timer.unwrap_or_default())?;
if let Some(expire_timer) = data_message.expire_timer {
store.update_expire_timer(&thread, expire_timer)?;
}

match data_message {
DataMessage {
Expand Down

0 comments on commit 1484d57

Please sign in to comment.