We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1483f4 commit 1fddbebCopy full SHA for 1fddbeb
packages/federation-sdk/src/repositories/event.repository.ts
@@ -9,7 +9,18 @@ export class EventRepository {
9
constructor(
10
@inject('EventCollection')
11
private readonly collection: Collection<EventStore>,
12
- ) {}
+ ) {
13
+ this.collection.createIndex({
14
+ 'event.room_id': 1,
15
+ 'nextEventId': 1,
16
+ 'event.depth': 1,
17
+ 'createdAt': 1,
18
+ });
19
20
21
+ 'event.type': 1,
22
23
+ }
24
25
async findById(eventId: EventID): Promise<EventStore | null> {
26
return this.collection.findOne({ _id: eventId });
0 commit comments