EventIndexing: Don't scope the event index per user.

This commit is contained in:
Damir Jelić 2019-11-14 14:13:49 +01:00
parent 9b32ec10b4
commit 28d2e658a4
3 changed files with 4 additions and 8 deletions

View file

@ -91,13 +91,10 @@ export default class BaseEventIndexManager {
/**
* Initialize the event index for the given user.
*
* @param {string} userId The unique identifier of the logged in user that
* owns the index.
*
* @return {Promise} A promise that will resolve when the event index is
* initialized.
*/
async initEventIndex(userId: string): Promise<> {
async initEventIndex(): Promise<> {
throw new Error("Unimplemented");
}

View file

@ -56,10 +56,9 @@ class EventIndexPeg {
}
const index = new EventIndex();
const userId = MatrixClientPeg.get().getUserId();
try {
await index.init(userId);
await index.init();
} catch (e) {
console.log("EventIndex: Error initializing the event index", e);
}

View file

@ -33,10 +33,10 @@ export default class EventIndexer {
this.liveEventsForIndex = new Set();
}
async init(userId) {
async init() {
const indexManager = PlatformPeg.get().getEventIndexingManager();
if (indexManager === null) return false;
indexManager.initEventIndex(userId);
indexManager.initEventIndex();
return true;
}