fix: pdu without state bug

This commit is contained in:
Timo Kösters 2021-07-29 12:33:44 +02:00
parent 5e924227b6
commit c209775abd
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
2 changed files with 48 additions and 41 deletions

View file

@ -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()?;