mirror of
https://github.com/mikedilger/chorus.git
synced 2026-05-03 06:51:42 +00:00
Don't index ephemeral events
This commit is contained in:
parent
609aa66b4d
commit
4cfc8a0074
@ -86,6 +86,8 @@ impl Store {
|
|||||||
if self.ids.get(&txn, event.id().0.as_slice())?.is_none() {
|
if self.ids.get(&txn, event.id().0.as_slice())?.is_none() {
|
||||||
offset = self.events.store_event(event)?;
|
offset = self.events.store_event(event)?;
|
||||||
|
|
||||||
|
// Do not index ephemeral events
|
||||||
|
if !event.kind().is_ephemeral() {
|
||||||
// Index by id
|
// Index by id
|
||||||
self.ids.put(&mut txn, event.id().0.as_slice(), &offset)?;
|
self.ids.put(&mut txn, event.id().0.as_slice(), &offset)?;
|
||||||
|
|
||||||
@ -130,6 +132,7 @@ impl Store {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
txn.commit()?;
|
txn.commit()?;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user