You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
BaseEventIndexManager: Add a method to perform runtime checks for indexing support.
This commit is contained in:
@@ -75,6 +75,19 @@ export interface HistoricEvent {
|
|||||||
* Instances of this class are provided by the application.
|
* Instances of this class are provided by the application.
|
||||||
*/
|
*/
|
||||||
export default class BaseEventIndexManager {
|
export default class BaseEventIndexManager {
|
||||||
|
/**
|
||||||
|
* Does our EventIndexManager support event indexing.
|
||||||
|
*
|
||||||
|
* If an EventIndexManager imlpementor has runtime dependencies that
|
||||||
|
* optionally enable event indexing they may override this method to perform
|
||||||
|
* the necessary runtime checks here.
|
||||||
|
*
|
||||||
|
* @return {Promise} A promise that will resolve to true if event indexing
|
||||||
|
* is supported, false otherwise.
|
||||||
|
*/
|
||||||
|
async supportsEventIndexing(): Promise<boolean> {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Initialize the event index for the given user.
|
* Initialize the event index for the given user.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user