fix: pdu without state bug
This commit is contained in:
parent
5e924227b6
commit
c209775abd
2 changed files with 48 additions and 41 deletions
|
@ -1435,6 +1435,13 @@ impl Rooms {
|
|||
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()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue