summaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2022-10-13 10:14:52 +0200
committerTimo Kösters <timo@koesters.xyz>2022-10-13 10:15:35 +0200
commitac52b234fa87e1e5690bf97efb7dcf4f50a9ed1d (patch)
tree1464d4970cf0450378a77689a814ec16123ea037 /src/database
parent37eb686b5b6c49ed830fda9d43bafb31851e224a (diff)
downloadconduit-ac52b234fa87e1e5690bf97efb7dcf4f50a9ed1d.zip
fix: all the e2ee problems
Diffstat (limited to 'src/database')
-rw-r--r--src/database/key_value/sending.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/database/key_value/sending.rs b/src/database/key_value/sending.rs
index 5424e8c..fcbe0f3 100644
--- a/src/database/key_value/sending.rs
+++ b/src/database/key_value/sending.rs
@@ -6,7 +6,7 @@ use crate::{
self,
sending::{OutgoingKind, SendingEventType},
},
- utils, Error, Result,
+ utils, Error, Result, services,
};
impl service::sending::Data for KeyValueDatabase {
@@ -66,11 +66,11 @@ impl service::sending::Data for KeyValueDatabase {
let mut keys = Vec::new();
for (outgoing_kind, event) in requests {
let mut key = outgoing_kind.get_prefix();
- key.extend_from_slice(if let SendingEventType::Pdu(value) = &event {
- value
+ if let SendingEventType::Pdu(value) = &event {
+ key.extend_from_slice(value)
} else {
- &[]
- });
+ key.extend_from_slice(&services().globals.next_count()?.to_be_bytes())
+ }
let value = if let SendingEventType::Edu(value) = &event {
&**value
} else {