EventIndexing: Don't scope the event index per user.
parent
9b32ec10b4
commit
28d2e658a4
|
|
@ -91,13 +91,10 @@ export default class BaseEventIndexManager {
|
||||||
/**
|
/**
|
||||||
* Initialize the event index for the given user.
|
* 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
|
* @return {Promise} A promise that will resolve when the event index is
|
||||||
* initialized.
|
* initialized.
|
||||||
*/
|
*/
|
||||||
async initEventIndex(userId: string): Promise<> {
|
async initEventIndex(): Promise<> {
|
||||||
throw new Error("Unimplemented");
|
throw new Error("Unimplemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,9 @@ class EventIndexPeg {
|
||||||
}
|
}
|
||||||
|
|
||||||
const index = new EventIndex();
|
const index = new EventIndex();
|
||||||
const userId = MatrixClientPeg.get().getUserId();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await index.init(userId);
|
await index.init();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("EventIndex: Error initializing the event index", e);
|
console.log("EventIndex: Error initializing the event index", e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ export default class EventIndexer {
|
||||||
this.liveEventsForIndex = new Set();
|
this.liveEventsForIndex = new Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(userId) {
|
async init() {
|
||||||
const indexManager = PlatformPeg.get().getEventIndexingManager();
|
const indexManager = PlatformPeg.get().getEventIndexingManager();
|
||||||
if (indexManager === null) return false;
|
if (indexManager === null) return false;
|
||||||
indexManager.initEventIndex(userId);
|
indexManager.initEventIndex();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue