Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -14,16 +14,15 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { IClientWellKnown } from 'matrix-js-sdk/src/client';
import { UnstableValue } from 'matrix-js-sdk/src/NamespacedValue';
import { IClientWellKnown } from "matrix-js-sdk/src/client";
import { UnstableValue } from "matrix-js-sdk/src/NamespacedValue";
import { MatrixClientPeg } from '../MatrixClientPeg';
import { MatrixClientPeg } from "../MatrixClientPeg";
const CALL_BEHAVIOUR_WK_KEY = "io.element.call_behaviour";
const E2EE_WK_KEY = "io.element.e2ee";
const E2EE_WK_KEY_DEPRECATED = "im.vector.riot.e2ee";
export const TILE_SERVER_WK_KEY = new UnstableValue(
"m.tile_server", "org.matrix.msc3488.tile_server");
export const TILE_SERVER_WK_KEY = new UnstableValue("m.tile_server", "org.matrix.msc3488.tile_server");
const EMBEDDED_PAGES_WK_PROPERTY = "io.element.embedded_pages";
/* eslint-disable camelcase */
@ -66,23 +65,16 @@ export function getTileServerWellKnown(): ITileServerWellKnown | undefined {
return tileServerFromWellKnown(MatrixClientPeg.get().getClientWellKnown());
}
export function tileServerFromWellKnown(
clientWellKnown?: IClientWellKnown | undefined,
): ITileServerWellKnown {
return (
clientWellKnown?.[TILE_SERVER_WK_KEY.name] ??
clientWellKnown?.[TILE_SERVER_WK_KEY.altName]
);
export function tileServerFromWellKnown(clientWellKnown?: IClientWellKnown | undefined): ITileServerWellKnown {
return clientWellKnown?.[TILE_SERVER_WK_KEY.name] ?? clientWellKnown?.[TILE_SERVER_WK_KEY.altName];
}
export function getEmbeddedPagesWellKnown(): IEmbeddedPagesWellKnown | undefined {
return embeddedPagesFromWellKnown(MatrixClientPeg.get()?.getClientWellKnown());
}
export function embeddedPagesFromWellKnown(
clientWellKnown?: IClientWellKnown,
): IEmbeddedPagesWellKnown {
return (clientWellKnown?.[EMBEDDED_PAGES_WK_PROPERTY]);
export function embeddedPagesFromWellKnown(clientWellKnown?: IClientWellKnown): IEmbeddedPagesWellKnown {
return clientWellKnown?.[EMBEDDED_PAGES_WK_PROPERTY];
}
export function isSecureBackupRequired(): boolean {
@ -106,10 +98,7 @@ export function getSecureBackupSetupMethods(): SecureBackupSetupMethod[] {
wellKnown["secure_backup_setup_methods"].includes(SecureBackupSetupMethod.Passphrase)
)
) {
return [
SecureBackupSetupMethod.Key,
SecureBackupSetupMethod.Passphrase,
];
return [SecureBackupSetupMethod.Key, SecureBackupSetupMethod.Passphrase];
}
return wellKnown["secure_backup_setup_methods"];
}