Tidy up comments
This commit is contained in:
@@ -12,18 +12,15 @@ import { JoinRule } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { test, expect } from "../../element-web-test";
|
||||
|
||||
const ROOM_NAME = "Test room";
|
||||
const OLD_NAME = "Alan";
|
||||
|
||||
const MEDIA_FILE = fs.readFileSync("playwright/sample-files/riot.png");
|
||||
|
||||
test.describe("Media preview settings", () => {
|
||||
test.use({
|
||||
displayName: OLD_NAME,
|
||||
displayName: "Alan",
|
||||
room: async ({ app, page, homeserver, bot, user }, use) => {
|
||||
const mxc = (await bot.uploadContent(MEDIA_FILE, { name: "image.png", type: "image/png" })).content_uri;
|
||||
const roomId = await bot.createRoom({
|
||||
name: ROOM_NAME,
|
||||
name: "Test room",
|
||||
invite: [user.userId],
|
||||
initial_state: [{ type: "m.room.avatar", content: { url: mxc }, state_key: "" }],
|
||||
});
|
||||
|
||||
1
src/@types/matrix-js-sdk.d.ts
vendored
1
src/@types/matrix-js-sdk.d.ts
vendored
@@ -17,7 +17,6 @@ import type { UserWidget } from "../utils/WidgetUtils-types.ts";
|
||||
import { type MediaPreviewConfig } from "./media_preview.ts";
|
||||
|
||||
// Extend Matrix JS SDK types via Typescript declaration merging to support unspecced event fields and types
|
||||
|
||||
declare module "matrix-js-sdk/src/types" {
|
||||
export interface FileInfo {
|
||||
/**
|
||||
|
||||
@@ -6,13 +6,28 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
export enum MediaPreviewValue {
|
||||
/**
|
||||
* Media previews should be enabled.
|
||||
*/
|
||||
On = "on",
|
||||
/**
|
||||
* Media previews should only be enabled for rooms with non-public join rules.
|
||||
*/
|
||||
Private = "private",
|
||||
/**
|
||||
* Media previews should be disabled.
|
||||
*/
|
||||
Off = "off",
|
||||
}
|
||||
|
||||
export const MEDIA_PREVIEW_ACCOUNT_DATA_TYPE = "io.element.msc4278.media_preview_config";
|
||||
export interface MediaPreviewConfig extends Record<string, unknown> {
|
||||
/**
|
||||
* Media preview setting for thumbnails of media in rooms.
|
||||
*/
|
||||
media_previews: MediaPreviewValue;
|
||||
/**
|
||||
* Media preview settings for avatars of rooms we have been invited to.
|
||||
*/
|
||||
invite_avatars: MediaPreviewValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user