feat: show call participants in room list (Discord-style)
Docker / Docker Buildx (push) Has been cancelled
Build Debian package / Build package (release) Has been cancelled
Build and Deploy / prepare (release) Has been cancelled
Deploy release / Deploy to Cloudflare Pages (release) Has been cancelled
Build and Deploy / Trigger Pro pipeline (release) Has been cancelled
Build and Deploy / Windows arm64 (release) Has been cancelled
Build and Deploy / Windows x64 (release) Has been cancelled
Build and Deploy / macOS (release) Has been cancelled
Build and Deploy / Linux amd64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / Linux arm64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / ${{ needs.prepare.outputs.deploy == 'true' && 'Deploy' || 'Deploy (dry-run)' }} (release) Has been cancelled
Build and Deploy / Deploy builds to ESS (release) Has been cancelled
Docker / Docker Buildx (push) Has been cancelled
Build Debian package / Build package (release) Has been cancelled
Build and Deploy / prepare (release) Has been cancelled
Deploy release / Deploy to Cloudflare Pages (release) Has been cancelled
Build and Deploy / Trigger Pro pipeline (release) Has been cancelled
Build and Deploy / Windows arm64 (release) Has been cancelled
Build and Deploy / Windows x64 (release) Has been cancelled
Build and Deploy / macOS (release) Has been cancelled
Build and Deploy / Linux amd64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / Linux arm64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / ${{ needs.prepare.outputs.deploy == 'true' && 'Deploy' || 'Deploy (dry-run)' }} (release) Has been cancelled
Build and Deploy / Deploy builds to ESS (release) Has been cancelled
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type WorkerOptions } from "../../../services.ts";
|
||||
|
||||
export const isDendrite = ({ homeserverType }: WorkerOptions): boolean => {
|
||||
return homeserverType === "dendrite" || homeserverType === "pinecone";
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type ClientServerApi, type Credentials } from "@element-hq/element-web-playwright-common/lib/utils/api.js";
|
||||
export { type Credentials } from "@element-hq/element-web-playwright-common/lib/utils/api.js";
|
||||
|
||||
export interface HomeserverInstance {
|
||||
readonly baseUrl: string;
|
||||
readonly csApi: ClientServerApi;
|
||||
|
||||
/**
|
||||
* Register a user on the given Homeserver using the shared registration secret.
|
||||
* @param username the username of the user to register
|
||||
* @param password the password of the user to register
|
||||
* @param displayName optional display name to set on the newly registered user
|
||||
*/
|
||||
registerUser(username: string, password: string, displayName?: string): Promise<Credentials>;
|
||||
|
||||
/**
|
||||
* Logs into synapse with the given username/password
|
||||
* @param userId login username
|
||||
* @param password login password
|
||||
*/
|
||||
loginUser(userId: string, password: string): Promise<Credentials>;
|
||||
|
||||
/**
|
||||
* Sets a third party identifier for the given user. This only supports setting a single 3pid and will
|
||||
* replace any others.
|
||||
* @param userId The full ID of the user to edit (as returned from registerUser)
|
||||
* @param medium The medium of the 3pid to set
|
||||
* @param address The address of the 3pid to set
|
||||
*/
|
||||
setThreepid(userId: string, medium: string, address: string): Promise<void>;
|
||||
}
|
||||
|
||||
export type HomeserverType = "synapse" | "dendrite" | "pinecone";
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type SynapseContainer } from "@element-hq/element-web-playwright-common/lib/testcontainers/index.js";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { type Fixtures } from "../../../element-web-test.ts";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export const consentHomeserver: Fixtures = {
|
||||
_homeserver: [
|
||||
async ({ _homeserver: container, mailpit }, use) => {
|
||||
(container as SynapseContainer)
|
||||
.withCopyDirectoriesToContainer([{ source: join(__dirname, "res"), target: "/data/res" }])
|
||||
.withSmtpServer(mailpit)
|
||||
.withConfig({
|
||||
user_consent: {
|
||||
template_dir: "/data/res/templates/privacy",
|
||||
version: "1.0",
|
||||
server_notice_content: {
|
||||
msgtype: "m.text",
|
||||
body: "To continue using this homeserver you must review and agree to the terms and conditions at %(consent_uri)s",
|
||||
},
|
||||
send_server_notice_to_guests: true,
|
||||
block_events_error:
|
||||
"To continue using this homeserver you must review and agree to the terms and conditions at %(consent_uri)s",
|
||||
require_at_registration: true,
|
||||
},
|
||||
server_notices: {
|
||||
system_mxid_localpart: "notices",
|
||||
system_mxid_display_name: "Server Notices",
|
||||
system_mxid_avatar_url: "mxc://localhost/oumMVlgDnLYFaPVkExemNVVZ",
|
||||
room_name: "Server Notices",
|
||||
},
|
||||
})
|
||||
.withConfigField("listeners[0].resources[0].names", ["client", "consent"]);
|
||||
await use(container);
|
||||
},
|
||||
{ scope: "worker" },
|
||||
],
|
||||
|
||||
context: async ({ homeserverType, context }, use, testInfo) => {
|
||||
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
|
||||
await use(context);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type Fixtures } from "../../../element-web-test.ts";
|
||||
|
||||
export const emailHomeserver: Fixtures = {
|
||||
_homeserver: [
|
||||
async ({ _homeserver: container, mailpit }, use) => {
|
||||
container.withConfig({
|
||||
enable_registration_without_verification: undefined,
|
||||
disable_msisdn_registration: undefined,
|
||||
registrations_require_3pid: ["email"],
|
||||
email: {
|
||||
smtp_host: "mailpit",
|
||||
smtp_port: 1025,
|
||||
notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>",
|
||||
app_name: "my_branded_matrix_server",
|
||||
},
|
||||
});
|
||||
await use(container);
|
||||
},
|
||||
{ scope: "worker" },
|
||||
],
|
||||
|
||||
context: async ({ homeserverType, context }, use, testInfo) => {
|
||||
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
|
||||
await use(context);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { TestContainers } from "testcontainers";
|
||||
|
||||
import { OAuthServer } from "../../oauth_server";
|
||||
import { type Fixtures } from "../../../element-web-test.ts";
|
||||
|
||||
export const legacyOAuthHomeserver: Fixtures = {
|
||||
oAuthServer: [
|
||||
// eslint-disable-next-line no-empty-pattern
|
||||
async ({}, use) => {
|
||||
const server = new OAuthServer();
|
||||
await use(server);
|
||||
server.stop();
|
||||
},
|
||||
{ scope: "worker" },
|
||||
],
|
||||
context: async ({ homeserverType, context, oAuthServer }, use, testInfo) => {
|
||||
testInfo.skip(homeserverType !== "synapse", "does not yet support OIDC");
|
||||
oAuthServer.onTestStarted(testInfo);
|
||||
await use(context);
|
||||
},
|
||||
_homeserver: [
|
||||
async ({ oAuthServer, _homeserver: homeserver }, use) => {
|
||||
const port = oAuthServer.start();
|
||||
await TestContainers.exposeHostPorts(port);
|
||||
homeserver.withConfig({
|
||||
oidc_providers: [
|
||||
{
|
||||
idp_id: "test",
|
||||
idp_name: "OAuth test",
|
||||
issuer: `http://localhost:${port}/oauth`,
|
||||
authorization_endpoint: `http://localhost:${port}/oauth/auth.html`,
|
||||
// the token endpoint receives requests from synapse,
|
||||
// rather than the webapp, so needs to escape the docker container.
|
||||
token_endpoint: `http://host.testcontainers.internal:${port}/oauth/token`,
|
||||
userinfo_endpoint: `http://host.testcontainers.internal:${port}/oauth/userinfo`,
|
||||
client_id: "synapse",
|
||||
discover: false,
|
||||
scopes: ["profile"],
|
||||
skip_verification: true,
|
||||
client_auth_method: "none",
|
||||
user_mapping_provider: {
|
||||
config: {
|
||||
display_name_template: "{{ user.name }}",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await use(homeserver);
|
||||
},
|
||||
{ scope: "worker" },
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright 2024-2025 New Vector Ltd.
|
||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { MatrixAuthenticationServiceContainer } from "../../../testcontainers/mas.ts";
|
||||
import { type Fixtures } from "../../../element-web-test.ts";
|
||||
|
||||
export const masHomeserver: Fixtures = {
|
||||
mas: [
|
||||
async ({ _homeserver: homeserver, logger, network, postgres, mailpit }, use) => {
|
||||
const secret = "AnotherRandomSecret";
|
||||
|
||||
const limits = { burst: 10, per_second: 10 };
|
||||
const container = await new MatrixAuthenticationServiceContainer(postgres)
|
||||
.withNetwork(network)
|
||||
.withNetworkAliases("mas")
|
||||
.withLogConsumer(logger.getConsumer("mas"))
|
||||
.withConfig({
|
||||
matrix: {
|
||||
kind: "synapse",
|
||||
homeserver: "localhost",
|
||||
secret,
|
||||
endpoint: "http://homeserver:8008",
|
||||
},
|
||||
rate_limiting: {
|
||||
login: {
|
||||
per_ip: limits,
|
||||
per_account: limits,
|
||||
},
|
||||
registration: limits,
|
||||
email_authentication: {
|
||||
per_ip: limits,
|
||||
per_address: limits,
|
||||
emails_per_session: limits,
|
||||
attempt_per_session: limits,
|
||||
},
|
||||
account_recovery: {
|
||||
per_ip: limits,
|
||||
per_address: limits,
|
||||
},
|
||||
},
|
||||
})
|
||||
.start();
|
||||
|
||||
homeserver.withConfig({
|
||||
enable_registration: undefined,
|
||||
enable_registration_without_verification: undefined,
|
||||
disable_msisdn_registration: undefined,
|
||||
password_config: undefined,
|
||||
matrix_authentication_service: {
|
||||
enabled: true,
|
||||
endpoint: "http://mas:8080/",
|
||||
secret,
|
||||
},
|
||||
});
|
||||
|
||||
await use(container);
|
||||
await container.stop();
|
||||
},
|
||||
{ scope: "worker" },
|
||||
],
|
||||
|
||||
context: async ({ homeserverType, context }, use, testInfo) => {
|
||||
testInfo.skip(homeserverType !== "synapse", "does not yet support MAS");
|
||||
await use(context);
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Test Privacy policy</title>
|
||||
</head>
|
||||
<body>
|
||||
{% if has_consented %}
|
||||
<p>Thank you, you've already accepted the license.</p>
|
||||
{% else %}
|
||||
<p>Please accept the license!</p>
|
||||
<form method="post" action="consent">
|
||||
<input type="hidden" name="v" value="{{version}}" />
|
||||
<input type="hidden" name="u" value="{{user}}" />
|
||||
<input type="hidden" name="h" value="{{userhmac}}" />
|
||||
<input type="submit" value="Sure thing!" />
|
||||
</form>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Test Privacy policy</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Danke schoen</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type Fixtures } from "../../../element-web-test.ts";
|
||||
|
||||
export const uiaLongSessionTimeoutHomeserver: Fixtures = {
|
||||
synapseConfig: [
|
||||
async ({ synapseConfig }, use) => {
|
||||
await use({
|
||||
...synapseConfig,
|
||||
ui_auth: {
|
||||
session_timeout: "300s",
|
||||
},
|
||||
});
|
||||
},
|
||||
{ scope: "worker" },
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user