mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-23 14:52:29 +00:00
fix: pdu without state bug
This commit is contained in:
2 files changed
+48
-41
No files matched your search
@@ -1435,6 +1435,13 @@ pub fn build_and_append_pdu(
|
||||
CanonicalJsonValue::String(pdu.event_id.as_str().to_owned()),
|
||||
);
|
||||
|
||||
// Generate short event id
|
||||
let shorteventid = db.globals.next_count()?;
|
||||
self.eventid_shorteventid
|
||||
.insert(pdu.event_id.as_bytes(), &shorteventid.to_be_bytes())?;
|
||||
self.shorteventid_eventid
|
||||
.insert(&shorteventid.to_be_bytes(), pdu.event_id.as_bytes())?;
|
||||
|
||||
// Increment the last index and use that
|
||||
// This is also the next_batch/since value
|
||||
let count = db.globals.next_count()?;
|
||||
|
||||
Reference in new issue
Block a user