fix: one time keys are never removed

This commit is contained in:
timokoesters 2020-05-23 19:17:08 +02:00
parent 5d6542a8a6
commit 1014388a9c
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
5 changed files with 54 additions and 102 deletions

View file

@ -20,7 +20,7 @@ pub fn increment(old: Option<&[u8]>) -> Option<Vec<u8>> {
let number = u64::from_be_bytes(array);
number + 1
}
None => 0,
None => 1, // Start at one. since 0 should return the first event in the db
};
Some(number.to_be_bytes().to_vec())