Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

Commit 57d2087

Browse files
committed
Merge tag 'v1.11.5' into sc
* Device manager - hide unverified security recommendation when only current session is unverified ([\#9228](matrix-org/matrix-react-sdk#9228)). Contributed by @kerryarchibald. * Device manager - scroll to filtered list from security recommendations ([\#9227](matrix-org/matrix-react-sdk#9227)). Contributed by @kerryarchibald. * Device manager - updated dropdown style in filtered device list ([\#9226](matrix-org/matrix-react-sdk#9226)). Contributed by @kerryarchibald. * Device manager - device type and verification icons on device tile ([\#9197](matrix-org/matrix-react-sdk#9197)). Contributed by @kerryarchibald. * Description of DM room with more than two other people is now being displayed correctly ([\#9231](matrix-org/matrix-react-sdk#9231)). Fixes element-hq/element-web#23094. * Fix voice messages with multiple composers ([\#9208](matrix-org/matrix-react-sdk#9208)). Fixes element-hq/element-web#23023. Contributed by @grimhilt. * Fix suggested rooms going missing ([\#9236](matrix-org/matrix-react-sdk#9236)). Fixes element-hq/element-web#23190. * Fix tooltip infinitely recursing ([\#9235](matrix-org/matrix-react-sdk#9235)). Fixes matrix-org/element-web-rageshakes#15107, matrix-org/element-web-rageshakes#15093 matrix-org/element-web-rageshakes#15092 and matrix-org/element-web-rageshakes#15077. * Fix plain text export saving ([\#9230](matrix-org/matrix-react-sdk#9230)). Contributed by @jryans. * Add missing space in SecurityRoomSettingsTab ([\#9222](matrix-org/matrix-react-sdk#9222)). Contributed by @gefgu. * Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](matrix-org/matrix-react-sdk#9209)). Fixes element-hq/element-web#21369. * Fix progress bar regression throughout the app ([\#9219](matrix-org/matrix-react-sdk#9219)). Fixes element-hq/element-web#23121. * Reuse empty string & space string logic for event types in devtools ([\#9218](matrix-org/matrix-react-sdk#9218)). Fixes element-hq/element-web#23115.
2 parents 9583025 + c4cbc54 commit 57d2087

10 files changed

Lines changed: 2605 additions & 291 deletions

File tree

.github/workflows/backport.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Backport
2+
on:
3+
pull_request_target:
4+
types:
5+
- closed
6+
- labeled
7+
branches:
8+
- develop
9+
10+
jobs:
11+
backport:
12+
name: Backport
13+
runs-on: ubuntu-latest
14+
# Only react to merged PRs for security reasons.
15+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
16+
if: >
17+
github.event.pull_request.merged
18+
&& (
19+
github.event.action == 'closed'
20+
|| (
21+
github.event.action == 'labeled'
22+
&& contains(github.event.label.name, 'backport')
23+
)
24+
)
25+
steps:
26+
- uses: tibdex/backport@v2
27+
with:
28+
labels_template: "<%= JSON.stringify(labels) %>"
29+
# We can't use GITHUB_TOKEN here or CI won't run on the new PR
30+
github_token: ${{ secrets.ELEMENT_BOT_TOKEN }}

.github/workflows/static_analysis.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,38 @@ jobs:
4141

4242
- name: Run Linter
4343
run: "yarn run lint:js"
44+
45+
tsc-strict:
46+
name: Typescript Strict Error Checker
47+
if: github.event_name == 'pull_request'
48+
runs-on: ubuntu-latest
49+
permissions:
50+
pull-requests: read
51+
checks: write
52+
steps:
53+
- uses: actions/checkout@v3
54+
55+
- name: Get diff lines
56+
id: diff
57+
uses: Equip-Collaboration/diff-line-numbers@v1.0.0
58+
with:
59+
include: '["\\.tsx?$"]'
60+
61+
- name: Detecting files changed
62+
id: files
63+
uses: futuratrepadeira/changed-files@v3.2.1
64+
with:
65+
repo-token: ${{ secrets.GITHUB_TOKEN }}
66+
pattern: '^.*\.tsx?$'
67+
68+
- uses: t3chguy/typescript-check-action@main
69+
with:
70+
repo-token: ${{ secrets.GITHUB_TOKEN }}
71+
use-check: false
72+
check-fail-mode: added
73+
output-behaviour: annotate
74+
ts-extra-args: '--strict'
75+
files-changed: ${{ steps.files.outputs.files_updated }}
76+
files-added: ${{ steps.files.outputs.files_created }}
77+
files-deleted: ${{ steps.files.outputs.files_deleted }}
78+
line-numbers: ${{ steps.diff.outputs.lineNumbers }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
.vscode
1515
.vscode/
1616
.DS_Store
17+
/test_artifacts/
18+
/coverage/

CHANGELOG.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
1+
Changes in [1.11.5](https://github.com/vector-im/element-desktop/releases/tag/v1.11.5) (2022-09-13)
2+
===================================================================================================
3+
4+
## ✨ Features
5+
* Device manager - hide unverified security recommendation when only current session is unverified ([\#9228](https://github.com/matrix-org/matrix-react-sdk/pull/9228)). Contributed by @kerryarchibald.
6+
* Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald.
7+
* Device manager - updated dropdown style in filtered device list ([\#9226](https://github.com/matrix-org/matrix-react-sdk/pull/9226)). Contributed by @kerryarchibald.
8+
* Device manager - device type and verification icons on device tile ([\#9197](https://github.com/matrix-org/matrix-react-sdk/pull/9197)). Contributed by @kerryarchibald.
9+
10+
## 🐛 Bug Fixes
11+
* Description of DM room with more than two other people is now being displayed correctly ([\#9231](https://github.com/matrix-org/matrix-react-sdk/pull/9231)). Fixes vector-im/element-web#23094.
12+
* Fix voice messages with multiple composers ([\#9208](https://github.com/matrix-org/matrix-react-sdk/pull/9208)). Fixes vector-im/element-web#23023. Contributed by @grimhilt.
13+
* Fix suggested rooms going missing ([\#9236](https://github.com/matrix-org/matrix-react-sdk/pull/9236)). Fixes vector-im/element-web#23190.
14+
* Fix tooltip infinitely recursing ([\#9235](https://github.com/matrix-org/matrix-react-sdk/pull/9235)). Fixes matrix-org/element-web-rageshakes#15107, matrix-org/element-web-rageshakes#15093 matrix-org/element-web-rageshakes#15092 and matrix-org/element-web-rageshakes#15077.
15+
* Fix plain text export saving ([\#9230](https://github.com/matrix-org/matrix-react-sdk/pull/9230)). Contributed by @jryans.
16+
* Add missing space in SecurityRoomSettingsTab ([\#9222](https://github.com/matrix-org/matrix-react-sdk/pull/9222)). Contributed by @gefgu.
17+
* Make use of js-sdk roomNameGenerator to handle i18n for generated room names ([\#9209](https://github.com/matrix-org/matrix-react-sdk/pull/9209)). Fixes vector-im/element-web#21369.
18+
* Fix progress bar regression throughout the app ([\#9219](https://github.com/matrix-org/matrix-react-sdk/pull/9219)). Fixes vector-im/element-web#23121.
19+
* Reuse empty string & space string logic for event types in devtools ([\#9218](https://github.com/matrix-org/matrix-react-sdk/pull/9218)). Fixes vector-im/element-web#23115.
20+
121
Changes in [1.11.4](https://github.com/vector-im/element-desktop/releases/tag/v1.11.4) (2022-08-31)
222
===================================================================================================
323

24+
## 🔒 Security
25+
* Fixes for [CVE-2022-36059](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D36059) and [CVE-2022-36060](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE%2D2022%2D36060)
26+
27+
Learn more about what we've been up to at https://element.io/blog/element-web-desktop-1-11-4-a-security-update-deferred-dms-and-more/
28+
Find more details of the vulnerabilities at https://matrix.org/blog/2022/08/31/security-releases-matrix-js-sdk-19-4-0-and-matrix-react-sdk-3-53-0
29+
430
## ✨ Features
531
* Upgrade to Electron 20 ([\#403](https://github.com/vector-im/element-desktop/pull/403)).
632
* Device manager - scroll to filtered list from security recommendations ([\#9227](https://github.com/matrix-org/matrix-react-sdk/pull/9227)). Contributed by @kerryarchibald.
@@ -1147,8 +1173,12 @@ Changes in [1.9.8](https://github.com/vector-im/element-desktop/releases/tag/v1.
11471173
Changes in [1.9.7](https://github.com/vector-im/element-desktop/releases/tag/v1.9.7) (2021-12-13)
11481174
=================================================================================================
11491175

1150-
* Security release with updated version of Olm to fix https://matrix.org/blog/2021/12/03/pre-disclosure-upcoming-security-release-of-libolm-and-matrix-js-sdk
1151-
* Fix a crash on logout
1176+
## 🔒 SECURITY FIXES
1177+
* Security release with updated version of Olm to fix https://matrix.org/blog/2021/12/03/pre-disclosure-upcoming-security-release-of-libolm-and-matrix-js-sdk
1178+
* Upgrade Electron to 13.5.2 to fix https://matrix.org/blog/2022/01/31/high-severity-vulnerability-in-element-desktop-1-9-6-and-earlier (https://github.com/vector-im/element-desktop/security/advisories/GHSA-mjrg-9f8r-h3m7)
1179+
1180+
## 🐛 Bug Fixes
1181+
* Fix a crash on logout
11521182

11531183
Changes in [1.9.6](https://github.com/vector-im/element-desktop/releases/tag/v1.9.6) (2021-12-06)
11541184
=================================================================================================

babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
presets: [
3+
['@babel/preset-env', { targets: { node: 'current' } }],
4+
'@babel/preset-typescript',
5+
],
6+
};

release.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#!/bin/bash
22
#
33
# Script to perform a release of element-desktop.
4-
#
5-
# Requires githib-changelog-generator; to install, do
6-
# pip install git+https://github.com/matrix-org/github-changelog-generator.git
74

85
set -e
96

10-
cd `dirname $0`
7+
cd "$(dirname "$0")"
118

12-
./node_modules/matrix-js-sdk/release.sh -n "$@"
9+
./node_modules/matrix-js-sdk/release.sh "$@"

scripts/fetch-package.js

Lines changed: 21 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -14,70 +14,9 @@ const { setPackageVersion } = require('./set-version.js');
1414

1515
const PUB_KEY_URL = "https://packages.riot.im/element-release-key.asc";
1616
const PACKAGE_URL_PREFIX = "https://github.com/vector-im/element-web/releases/download/";
17+
const DEVELOP_TGZ_URL = "https://vector-im.github.io/element-web/develop.tar.gz";
1718
const ASAR_PATH = 'webapp.asar';
1819

19-
async function getLatestDevelopUrl(bkToken) {
20-
const buildsResult = await needle('get',
21-
"https://api.buildkite.com/v2/organizations/matrix-dot-org/pipelines/element-web/builds",
22-
{
23-
branch: 'develop',
24-
state: 'passed',
25-
per_page: 1,
26-
},
27-
{
28-
headers: {
29-
authorization: "Bearer " + bkToken,
30-
},
31-
},
32-
);
33-
const latestBuild = buildsResult.body[0];
34-
console.log("Latest build is " + latestBuild.number);
35-
let artifactUrl;
36-
for (const job of latestBuild.jobs) {
37-
// Strip any colon-form emoji from the build name
38-
if (job.name && job.name.replace(/:\w*:\s*/, '') === 'Package') {
39-
artifactUrl = job.artifacts_url;
40-
break;
41-
}
42-
}
43-
if (artifactUrl === undefined) {
44-
throw new Error("Couldn't find artifact URL - has the name of the package job changed?");
45-
}
46-
47-
const artifactsResult = await needle('get', artifactUrl, {},
48-
{
49-
headers: {
50-
authorization: "Bearer " + bkToken,
51-
},
52-
},
53-
);
54-
let dlUrl;
55-
let dlFilename;
56-
for (const artifact of artifactsResult.body) {
57-
if (artifact.filename && /^element-.*\.tar.gz$/.test(artifact.filename)) {
58-
dlUrl = artifact.download_url;
59-
dlFilename = artifact.filename;
60-
break;
61-
}
62-
}
63-
if (dlUrl === undefined) {
64-
throw new Error("Couldn't find artifact download URL - has the artifact filename changed?");
65-
}
66-
console.log("Fetching artifact URL...");
67-
const dlResult = await needle('get', dlUrl, {},
68-
{
69-
headers: {
70-
authorization: "Bearer " + bkToken,
71-
},
72-
// This URL will give us a Location header, but will also give us
73-
// a JSON object with the direct URL. We'll take the URL and pass it
74-
// back, then we can easily support specifying a URL directly.
75-
follow_max: 0,
76-
},
77-
);
78-
return [dlFilename, dlResult.body.url];
79-
}
80-
8120
async function downloadToFile(url, filename) {
8221
console.log("Downloading " + url + "...");
8322

@@ -150,24 +89,17 @@ async function main() {
15089
if (sc) {
15190
} else if (targetVersion === undefined) {
15291
targetVersion = 'v' + riotDesktopPackageJson.version;
153-
filename = 'element-' + targetVersion + '.tar.gz';
154-
url = PACKAGE_URL_PREFIX + targetVersion + '/' + filename;
155-
} else if (targetVersion === 'develop') {
156-
const buildKiteApiKey = process.env.BUILDKITE_API_KEY;
157-
if (buildKiteApiKey === undefined) {
158-
console.log("Set BUILDKITE_API_KEY to fetch latest develop version");
159-
console.log(
160-
"Sorry - Buildkite's API requires authentication to access builds, " +
161-
"even if those builds are accessible on the web with no auth.",
162-
);
163-
process.exit(1);
164-
}
165-
[filename, url] = await getLatestDevelopUrl(buildKiteApiKey);
92+
} else if (targetVersion !== 'develop') {
93+
setVersion = true; // version was specified
94+
}
95+
96+
if (targetVersion === 'develop') {
97+
filename = 'develop.tar.gz';
98+
url = DEVELOP_TGZ_URL;
16699
verify = false; // develop builds aren't signed
167100
} else {
168101
filename = 'element-' + targetVersion + '.tar.gz';
169102
url = PACKAGE_URL_PREFIX + targetVersion + '/' + filename;
170-
setVersion = true;
171103
}
172104

173105
const haveGpg = await new Promise((resolve) => {
@@ -209,7 +141,7 @@ async function main() {
209141
}
210142

211143
let haveDeploy = false;
212-
const expectedDeployDir = sc ? "../element-web/webapp" : path.join(deployDir, path.basename(filename).replace(/\.tar\.gz/, ''));
144+
let expectedDeployDir = sc ? "../element-web/webapp" : path.join(deployDir, path.basename(filename).replace(/\.tar\.gz/, ''));
213145
try {
214146
await fs.opendirSync(expectedDeployDir);
215147
console.log(expectedDeployDir + "already exists");
@@ -260,6 +192,12 @@ async function main() {
260192
await tar.x({
261193
file: outPath,
262194
cwd: deployDir,
195+
onentry: entry => {
196+
// Find the appropriate extraction path, only needed for `develop` where the dir name is unknown
197+
if (entry.type === "Directory" && !path.join(deployDir, entry.path).startsWith(expectedDeployDir)) {
198+
expectedDeployDir = path.join(deployDir, entry.path);
199+
}
200+
},
263201
});
264202
}
265203

@@ -291,4 +229,9 @@ async function main() {
291229
console.log("Done!");
292230
}
293231

294-
main().then((ret) => process.exit(ret)).catch(e => process.exit(1));
232+
main().then((ret) => {
233+
process.exit(ret);
234+
}).catch(e => {
235+
console.error(e);
236+
process.exit(1);
237+
});

test/launch-test.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
Copyright 2022 The Matrix.org Foundation C.I.C.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
import * as os from "os";
18+
import * as fs from "fs";
19+
import * as path from "path";
20+
import "expect-playwright";
21+
import { _electron as electron } from "playwright";
22+
import { ElectronApplication, Page } from "playwright-core";
23+
24+
describe("App launch", () => {
25+
const artifactsPath = path.join(process.cwd(), "test_artifacts");
26+
fs.mkdirSync(artifactsPath);
27+
28+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "element-desktop-tests"));
29+
console.log("Using temp profile directory: ", tmpDir);
30+
31+
let app: ElectronApplication;
32+
let window: Page;
33+
34+
beforeAll(async () => {
35+
const args = ["--profile-dir", tmpDir];
36+
37+
const executablePath = process.env["ELEMENT_DESKTOP_EXECUTABLE"];
38+
if (!executablePath) {
39+
// Unpackaged mode testing
40+
args.unshift("./lib/electron-main.js");
41+
}
42+
43+
app = await electron.launch({
44+
executablePath,
45+
args,
46+
recordVideo: {
47+
dir: artifactsPath,
48+
}
49+
});
50+
window = await app.firstWindow();
51+
});
52+
53+
afterAll(async () => {
54+
await app?.close();
55+
fs.rmSync(tmpDir, { recursive: true });
56+
});
57+
58+
it("should launch and render the welcome view successfully", async () => {
59+
await window.locator("#matrixchat").waitFor();
60+
await window.locator(".mx_Welcome").waitFor();
61+
await expect(window).toMatchURL("vector://vector/webapp/#/welcome");
62+
await window.screenshot({ path: path.join(artifactsPath, "welcome.png") });
63+
}, 30000);
64+
});

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
"lib": [
1515
"es2019",
1616
"dom"
17-
]
17+
],
18+
"types": ["jest", "node"],
1819
},
1920
"include": [
20-
"./src/**/*.ts"
21+
"./src/**/*.ts",
22+
"./tests/**/*.ts"
2123
]
2224
}

0 commit comments

Comments
 (0)