You've already forked matrix-js-sdk
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:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user