1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

use cli.canSupport to determine intentional mentions support (#3445)

* use cli.canSupport to determine intentional mentions support

* more specific comment

* Update src/client.ts

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Kerry
2023-06-07 09:52:55 +12:00
committed by GitHub
parent c52e4b6329
commit f0fa4d2cc8
2 changed files with 6 additions and 7 deletions

View File

@@ -469,11 +469,6 @@ export interface IStartClientOpts {
* @experimental
*/
slidingSync?: SlidingSync;
/**
* @experimental
*/
intentionalMentions?: boolean;
}
export interface IStoredClientOpts extends IStartClientOpts {}
@@ -9635,11 +9630,11 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
/**
* A helper to determine intentional mentions support
* @returns a boolean to determine if intentional mentions are enabled
* @returns a boolean to determine if intentional mentions are enabled on the server
* @experimental
*/
public supportsIntentionalMentions(): boolean {
return this.clientOpts?.intentionalMentions || false;
return this.canSupport.get(Feature.IntentionalMentions) !== ServerSupport.Unsupported;
}
/**