Don't index ephemeral events

This commit is contained in:
Mike Dilger 2024-02-15 22:47:58 +13:00
parent 609aa66b4d
commit 4cfc8a0074

View File

@ -86,6 +86,8 @@ impl Store {
if self.ids.get(&txn, event.id().0.as_slice())?.is_none() {
offset = self.events.store_event(event)?;
// Do not index ephemeral events
if !event.kind().is_ephemeral() {
// Index by id
self.ids.put(&mut txn, event.id().0.as_slice(), &offset)?;
@ -130,6 +132,7 @@ impl Store {
}
}
}
}
txn.commit()?;
} else {