Merge upstream v1.12.26 - reconnect the fork to Element Web (management #0099)

The repo had no upstream ancestry: a whole tree arrived in one commit in May, so
every update meant re-applying our patches by hand onto a fresh checkout, and a file
Element moved would take our lines with it silently.

The real base was found by measuring tree distance across develop rather than trusting
the changelog: deadd548, not the v1.12.17 tag. With that set as a temporary graft, this
merge computed as a proper three-way merge - 32 conflicts instead of 1757.

Resolutions, each decided rather than defaulted:

- 24 GitHub workflows stay deleted; we build on GitLab CI.
- MImageBody.tsx is gone upstream, migrated to MVVM. Our ClamAV error label moved into
  ImageBodyViewModel.computeErrorLabel, ahead of the DecryptError branch, matching what
  VideoBodyViewModel and FileBodyViewModel already do.
- Upstream extracted the room list item body into RoomListItemContent. Our call
  participants list and its getInitials helper moved there; both sides' CSS classes and
  both sides' props are kept.
- matrix-js-sdk follows upstream at 42.2.0 - our git ref pin was a workaround for a
  stale ref, and following upstream is the point of this merge.
- Element Call stays ours. Checked before deciding: @element-hq/element-call-embedded
  is referenced nowhere in the tree, while webpack.config.ts needs
  @sorb/threadnet-call-embedded, so taking upstream's line would have deleted the noise
  suppression from #0054 without a word.

The lockfile was regenerated with pnpm 11.20.0, which upstream now requires through
devEngines. CI already runs corepack enable, and onFail: download makes it fetch that
version by itself.

Not yet accepted: this needs a build and the ClamAV functional test - send an encrypted
file, receive a rejected one - before it goes near main.
This commit is contained in:
Thore Cimbal
2026-08-19 12:00:00 +00:00
2884 changed files with 111523 additions and 71192 deletions
@@ -19,6 +19,7 @@ export default class ExampleModule {
}
async load() {
const brand = this.api.config.get("brand");
// oxlint-disable-next-line no-alert
alert(this.api.i18n.translate("key", { brand }));
}
}
+7 -10
View File
@@ -5,28 +5,25 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import { dirname, join } from "node:path";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { readFile } from "node:fs/promises";
import { readFileSync } from "node:fs";
const __dirname = dirname(fileURLToPath(import.meta.url));
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export function getSampleFilePath(file: string): string {
return join(__dirname, file);
return path.join(__dirname, file);
}
export function readSampleFile(file: string, encoding: null): Promise<NonSharedBuffer>;
export function readSampleFile(file: string, encoding: null): Promise<Buffer>;
export function readSampleFile(file: string, encoding?: BufferEncoding): Promise<string>;
export function readSampleFile(
file: string,
encoding: BufferEncoding | null = "utf-8",
): Promise<NonSharedBuffer | string> {
export function readSampleFile(file: string, encoding: BufferEncoding | null = "utf-8"): Promise<Buffer | string> {
return readFile(getSampleFilePath(file), encoding);
}
export function readSampleFileSync(file: string, encoding: null): NonSharedBuffer;
export function readSampleFileSync(file: string, encoding: null): Buffer;
export function readSampleFileSync(file: string, encoding?: BufferEncoding): string;
export function readSampleFileSync(file: string, encoding: BufferEncoding | null = "utf-8"): NonSharedBuffer | string {
export function readSampleFileSync(file: string, encoding: BufferEncoding | null = "utf-8"): Buffer | string {
return readFileSync(getSampleFilePath(file), encoding);
}
@@ -0,0 +1,17 @@
/*
Copyright 2026 Element Creations 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.
*/
export default class SettingsModule {
static moduleApiVersion = "^*";
constructor(api) {
this.api = api;
}
async load() {
// oxlint-disable-next-line no-alert
alert(this.api.settings.getValue("language"));
}
}
@@ -0,0 +1,35 @@
/*
Copyright 2026 Element Creations 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.
*/
// Note: eslint-plugin-jsdoc doesn't like import types as parameters, so we
// get around it with @typedef
/**
* @typedef {import("@element-hq/element-web-module-api").Api} Api
*/
export default class CustomComponentModule {
static moduleApiVersion = "^*";
/**
* Basic module for testing.
* @param {Api} api API object
*/
constructor(api) {
this.api = api;
}
async load() {
this.api.composer.addFileUploadOption({
type: "org.example.uploader",
label: "Example uploader",
onSelected: (_roomId, view) => {
this.api.composer.openFileUploadConfirmation(
[new File(["test"], "testfile.txt", { type: "text/plain" })],
view,
);
},
});
}
}