Skip to content

Commit 1bee3be

Browse files
committed
Merge branch 'develop' of https://github.com/vector-im/element-web into t3chguy/fix/20721
2 parents a478463 + bfac727 commit 1bee3be

File tree

69 files changed

+1359
-601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1359
-601
lines changed

Diff for: .github/workflows/dockerhub.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Docker meta
4141
id: meta
42-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
42+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
4343
with:
4444
images: |
4545
vectorim/element-web
@@ -51,7 +51,7 @@ jobs:
5151
5252
- name: Build and push
5353
id: build-and-push
54-
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
54+
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6
5555
with:
5656
context: .
5757
push: true

Diff for: .github/workflows/pull_request.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
action:
1010
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop
1111
permissions:
12-
pull-requests: read
12+
pull-requests: write
1313
secrets:
1414
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

Diff for: .github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
permissions:
1919
contents: write
2020
issues: write
21+
pull-requests: read
2122
secrets:
2223
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
2324
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

Diff for: .github/workflows/release_prepare.yml

+15
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,23 @@ on:
1919
default: true
2020
permissions: {} # Uses ELEMENT_BOT_TOKEN instead
2121
jobs:
22+
checks:
23+
name: Sanity checks
24+
strategy:
25+
matrix:
26+
repo:
27+
- matrix-org/matrix-js-sdk
28+
- element-hq/element-web
29+
- element-hq/element-desktop
30+
uses: matrix-org/matrix-js-sdk/.github/workflows/release-checks.yml@develop
31+
secrets:
32+
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
33+
with:
34+
repository: ${{ matrix.repo }}
35+
2236
prepare:
2337
runs-on: ubuntu-24.04
38+
needs: checks
2439
env:
2540
# The order is specified bottom-up to avoid any races for allchange
2641
REPOS: matrix-js-sdk element-web element-desktop

Diff for: .github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104

105105
- name: Skip SonarCloud in merge queue
106106
if: github.event_name == 'merge_group' || inputs.disable_coverage == 'true'
107-
uses: guibranco/github-status-action-v2@1f26a0237cd1a57626fbb5a0eb2494c9b8797d07
107+
uses: guibranco/github-status-action-v2@66088c44e212a906c32a047529a213d81809ec1c
108108
with:
109109
authToken: ${{ secrets.GITHUB_TOKEN }}
110110
state: success

Diff for: __mocks__/FontManager.js

-6
This file was deleted.

Diff for: jest.config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const config: Config = {
3232
"decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js",
3333
"waveWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
3434
"context-filter-polyfill": "<rootDir>/__mocks__/empty.js",
35-
"FontManager.ts": "<rootDir>/__mocks__/FontManager.js",
3635
"workers/(.+)Factory": "<rootDir>/__mocks__/workerFactoryMock.js",
3736
"^!!raw-loader!.*": "jest-raw-loader",
3837
"recorderWorkletFactory": "<rootDir>/__mocks__/empty.js",

Diff for: package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"resolutions": {
7474
"oidc-client-ts": "3.1.0",
7575
"jwt-decode": "4.0.0",
76-
"caniuse-lite": "1.0.30001679",
76+
"caniuse-lite": "1.0.30001684",
7777
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0",
7878
"wrap-ansi": "npm:wrap-ansi@^7.0.0"
7979
},
@@ -114,10 +114,10 @@
114114
"jsrsasign": "^11.0.0",
115115
"jszip": "^3.7.0",
116116
"katex": "^0.16.0",
117-
"linkify-element": "4.1.3",
118-
"linkify-react": "4.1.3",
119-
"linkify-string": "4.1.3",
120-
"linkifyjs": "4.1.3",
117+
"linkify-element": "4.1.4",
118+
"linkify-react": "4.1.4",
119+
"linkify-string": "4.1.4",
120+
"linkifyjs": "4.1.4",
121121
"lodash": "^4.17.21",
122122
"maplibre-gl": "^4.0.0",
123123
"matrix-encrypt-attachment": "^1.0.3",
@@ -273,6 +273,7 @@
273273
"raw-loader": "^4.0.2",
274274
"rimraf": "^6.0.0",
275275
"semver": "^7.5.2",
276+
"source-map-loader": "^5.0.0",
276277
"stylelint": "^16.1.0",
277278
"stylelint-config-standard": "^36.0.0",
278279
"stylelint-scss": "^6.0.0",

Diff for: playwright/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/playwright:v1.48.2-jammy
1+
FROM mcr.microsoft.com/playwright:v1.49.0-jammy
22

33
WORKDIR /work
44

Diff for: playwright/e2e/crypto/decryption-failure-messages.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ test.describe("Cryptography", function () {
6767
await page.locator(".mx_AuthPage").getByRole("button", { name: "I'll verify later" }).click();
6868
await app.viewRoomByName("Test room");
6969

70+
// In this case, the call to cryptoApi.isEncryptionEnabledInRoom is taking a long time to resolve
71+
await page.waitForTimeout(1000);
72+
7073
// There should be two historical events in the timeline
7174
const tiles = await page.locator(".mx_EventTile").all();
7275
expect(tiles.length).toBeGreaterThanOrEqual(2);

Diff for: playwright/e2e/crypto/event-shields.spec.ts

+26
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
logOutOfElement,
1717
verify,
1818
} from "./utils";
19+
import { bootstrapCrossSigningForClient } from "../../pages/client.ts";
1920

2021
test.describe("Cryptography", function () {
2122
test.use({
@@ -307,5 +308,30 @@ test.describe("Cryptography", function () {
307308
const penultimate = page.locator(".mx_EventTile").filter({ hasText: "test encrypted from verified" });
308309
await expect(penultimate.locator(".mx_EventTile_e2eIcon")).not.toBeVisible();
309310
});
311+
312+
test("should show correct shields on events sent by users with changed identity", async ({
313+
page,
314+
app,
315+
bot: bob,
316+
homeserver,
317+
}) => {
318+
// Verify Bob
319+
await verify(app, bob);
320+
321+
// Bob logs in a new device and resets cross-signing
322+
const bobSecondDevice = await createSecondBotDevice(page, homeserver, bob);
323+
await bootstrapCrossSigningForClient(await bobSecondDevice.prepareClient(), bob.credentials, true);
324+
325+
/* should show an error for a message from a previously verified device */
326+
await bobSecondDevice.sendMessage(testRoomId, "test encrypted from user that was previously verified");
327+
const last = page.locator(".mx_EventTile_last");
328+
await expect(last).toContainText("test encrypted from user that was previously verified");
329+
const lastE2eIcon = last.locator(".mx_EventTile_e2eIcon");
330+
await expect(lastE2eIcon).toHaveClass(/mx_EventTile_e2eIcon_warning/);
331+
await lastE2eIcon.focus();
332+
await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText(
333+
"Sender's verified identity has changed",
334+
);
335+
});
310336
});
311337
});

Diff for: playwright/plugins/homeserver/synapse/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { randB64Bytes } from "../../utils/rand";
2020
// Docker tag to use for synapse docker image.
2121
// We target a specific digest as every now and then a Synapse update will break our CI.
2222
// This digest is updated by the playwright-image-updates.yaml workflow periodically.
23-
const DOCKER_TAG = "develop@sha256:34da08a44994e0ad2def7ed5f28c3cc7a2f7ead9722f4ae87b23030f59384ea5";
23+
const DOCKER_TAG = "develop@sha256:b261d81d9a3615a7716fc92423ee5689b0b450ed49f87a4887e49ecab7aefe45";
2424

2525
async function cfgDirFromTemplate(opts: StartHomeserverOpts): Promise<Omit<HomeserverConfig, "dockerUrl">> {
2626
const templateDir = path.join(__dirname, "templates", opts.template);

Diff for: res/fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.woff2

-2.77 MB
Binary file not shown.

Diff for: res/themes/light/css/_fonts.pcss

+18
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,21 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2
143143
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
144144
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
145145
}
146+
147+
/* Twemoji COLR */
148+
@font-face {
149+
font-family: "Twemoji";
150+
font-weight: 400;
151+
src: url("$(res)/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2");
152+
}
153+
/* For at least Chrome on Windows 10, we have to explictly add extra weights for the emoji to appear in bold messages, etc. */
154+
@font-face {
155+
font-family: "Twemoji";
156+
font-weight: 600;
157+
src: url("$(res)/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2");
158+
}
159+
@font-face {
160+
font-family: "Twemoji";
161+
font-weight: 700;
162+
src: url("$(res)/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2") format("woff2");
163+
}

Diff for: src/components/structures/FilePanel.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ class FilePanel extends React.Component<IProps, IState> {
104104
}
105105

106106
if (!this.state.timelineSet.eventIdToTimeline(ev.getId()!)) {
107-
this.state.timelineSet.addEventToTimeline(ev, timeline, false);
107+
this.state.timelineSet.addEventToTimeline(ev, timeline, {
108+
fromCache: false,
109+
addToState: false,
110+
toStartOfTimeline: false,
111+
});
108112
}
109113
}
110114

Diff for: src/components/structures/LoggedInView.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import classNames from "classnames";
2323
import { isOnlyCtrlOrCmdKeyEvent, Key } from "../../Keyboard";
2424
import PageTypes from "../../PageTypes";
2525
import MediaDeviceHandler from "../../MediaDeviceHandler";
26-
import { fixupColorFonts } from "../../utils/FontManager";
2726
import dis from "../../dispatcher/dispatcher";
2827
import { IMatrixClientCreds } from "../../MatrixClientPeg";
2928
import SettingsStore from "../../settings/SettingsStore";
@@ -149,8 +148,6 @@ class LoggedInView extends React.Component<IProps, IState> {
149148

150149
MediaDeviceHandler.loadDevices();
151150

152-
fixupColorFonts();
153-
154151
this._roomView = React.createRef();
155152
this._resizeContainer = React.createRef();
156153
this.resizeHandler = React.createRef();

0 commit comments

Comments
 (0)