Skip to content

Commit fede380

Browse files
committed
Merge tag 'v3.72.0' into sc
* Add UIFeature.locationSharing to hide location sharing ([\matrix-org#10727](matrix-org#10727)). * Memoize field validation results ([\matrix-org#10714](matrix-org#10714)). * Commands for plain text editor ([\matrix-org#10567](matrix-org#10567)). Contributed by @alunturner. * Allow 16 lines of text in the rich text editors ([\matrix-org#10670](matrix-org#10670)). Contributed by @alunturner. * Bail out of `RoomSettingsDialog` when room is not found ([\matrix-org#10662](matrix-org#10662)). Contributed by @kerryarchibald. * Element-R: Populate device list for right-panel ([\matrix-org#10671](matrix-org#10671)). Contributed by @florianduros. * Make existing and new issue URLs configurable ([\matrix-org#10710](matrix-org#10710)). Fixes element-hq/element-web#24424. * Fix usages of ARIA tabpanel ([\matrix-org#10628](matrix-org#10628)). Fixes element-hq/element-web#25016. * Element-R: Starting a DMs with a user ([\matrix-org#10673](matrix-org#10673)). Contributed by @florianduros. * ARIA Accessibility improvements ([\matrix-org#10675](matrix-org#10675)). * ARIA Accessibility improvements ([\matrix-org#10674](matrix-org#10674)). * Add arrow key controls to emoji and reaction pickers ([\matrix-org#10637](matrix-org#10637)). Fixes element-hq/element-web#17189. * Translate credits in help about section ([\matrix-org#10676](matrix-org#10676)). * Fix: reveal images when image previews are disabled ([\matrix-org#10781](matrix-org#10781)). Fixes element-hq/element-web#25271. Contributed by @kerryarchibald. * Fix autocomplete not resetting properly on message send ([\matrix-org#10741](matrix-org#10741)). Fixes element-hq/element-web#25170. * Fix start_sso not working with guests disabled ([\matrix-org#10720](matrix-org#10720)). Fixes element-hq/element-web#16624. * Fix soft crash with Element call widgets ([\matrix-org#10684](matrix-org#10684)). * Send correct receipt when marking a room as read ([\matrix-org#10730](matrix-org#10730)). Fixes element-hq/element-web#25207. * Offload some more waveform processing onto a worker ([\matrix-org#9223](matrix-org#9223)). Fixes element-hq/element-web#19756. * Consolidate login errors ([\matrix-org#10722](matrix-org#10722)). Fixes element-hq/element-web#17520. * Fix all rooms search generating permalinks to wrong room id ([\matrix-org#10625](matrix-org#10625)). Fixes element-hq/element-web#25115. * Posthog properly handle Analytics ID changing from under us ([\matrix-org#10702](matrix-org#10702)). Fixes element-hq/element-web#25187. * Fix Clock being read as an absolute time rather than duration ([\matrix-org#10706](matrix-org#10706)). Fixes element-hq/element-web#22582. * Properly translate errors in `ChangePassword.tsx` so they show up translated to the user but not in our logs ([\matrix-org#10615](matrix-org#10615)). Fixes element-hq/element-web#9597. Contributed by @MadLittleMods. * Honour feature toggles in guest mode ([\matrix-org#10651](matrix-org#10651)). Fixes element-hq/element-web#24513. Contributed by @andybalaam. * Fix default content in devtools event sender ([\matrix-org#10699](matrix-org#10699)). Contributed by @tulir. * Fix a crash when a call ends while you're in it ([\matrix-org#10681](matrix-org#10681)). Fixes element-hq/element-web#25153. * Fix lack of screen reader indication when triggering auto complete ([\matrix-org#10664](matrix-org#10664)). Fixes element-hq/element-web#11011. * Fix typing tile duplicating users ([\matrix-org#10678](matrix-org#10678)). Fixes element-hq/element-web#25165. * Fix wrong room topic tooltip position ([\matrix-org#10667](matrix-org#10667)). Fixes element-hq/element-web#25158. * Fix create subspace dialog not working ([\matrix-org#10652](matrix-org#10652)). Fixes element-hq/element-web#24882.
2 parents 3500060 + 0e2f000 commit fede380

File tree

437 files changed

+10244
-3100
lines changed

Some content is hidden

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

437 files changed

+10244
-3100
lines changed

CHANGELOG.md

+38
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
Changes in [3.72.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.72.0) (2023-05-10)
2+
=====================================================================================================
3+
4+
## ✨ Features
5+
* Add UIFeature.locationSharing to hide location sharing ([\#10727](https://github.com/matrix-org/matrix-react-sdk/pull/10727)).
6+
* Memoize field validation results ([\#10714](https://github.com/matrix-org/matrix-react-sdk/pull/10714)).
7+
* Commands for plain text editor ([\#10567](https://github.com/matrix-org/matrix-react-sdk/pull/10567)). Contributed by @alunturner.
8+
* Allow 16 lines of text in the rich text editors ([\#10670](https://github.com/matrix-org/matrix-react-sdk/pull/10670)). Contributed by @alunturner.
9+
* Bail out of `RoomSettingsDialog` when room is not found ([\#10662](https://github.com/matrix-org/matrix-react-sdk/pull/10662)). Contributed by @kerryarchibald.
10+
* Element-R: Populate device list for right-panel ([\#10671](https://github.com/matrix-org/matrix-react-sdk/pull/10671)). Contributed by @florianduros.
11+
* Make existing and new issue URLs configurable ([\#10710](https://github.com/matrix-org/matrix-react-sdk/pull/10710)). Fixes vector-im/element-web#24424.
12+
* Fix usages of ARIA tabpanel ([\#10628](https://github.com/matrix-org/matrix-react-sdk/pull/10628)). Fixes vector-im/element-web#25016.
13+
* Element-R: Starting a DMs with a user ([\#10673](https://github.com/matrix-org/matrix-react-sdk/pull/10673)). Contributed by @florianduros.
14+
* ARIA Accessibility improvements ([\#10675](https://github.com/matrix-org/matrix-react-sdk/pull/10675)).
15+
* ARIA Accessibility improvements ([\#10674](https://github.com/matrix-org/matrix-react-sdk/pull/10674)).
16+
* Add arrow key controls to emoji and reaction pickers ([\#10637](https://github.com/matrix-org/matrix-react-sdk/pull/10637)). Fixes vector-im/element-web#17189.
17+
* Translate credits in help about section ([\#10676](https://github.com/matrix-org/matrix-react-sdk/pull/10676)).
18+
19+
## 🐛 Bug Fixes
20+
* Fix: reveal images when image previews are disabled ([\#10781](https://github.com/matrix-org/matrix-react-sdk/pull/10781)). Fixes vector-im/element-web#25271. Contributed by @kerryarchibald.
21+
* Fix autocomplete not resetting properly on message send ([\#10741](https://github.com/matrix-org/matrix-react-sdk/pull/10741)). Fixes vector-im/element-web#25170.
22+
* Fix start_sso not working with guests disabled ([\#10720](https://github.com/matrix-org/matrix-react-sdk/pull/10720)). Fixes vector-im/element-web#16624.
23+
* Fix soft crash with Element call widgets ([\#10684](https://github.com/matrix-org/matrix-react-sdk/pull/10684)).
24+
* Send correct receipt when marking a room as read ([\#10730](https://github.com/matrix-org/matrix-react-sdk/pull/10730)). Fixes vector-im/element-web#25207.
25+
* Offload some more waveform processing onto a worker ([\#9223](https://github.com/matrix-org/matrix-react-sdk/pull/9223)). Fixes vector-im/element-web#19756.
26+
* Consolidate login errors ([\#10722](https://github.com/matrix-org/matrix-react-sdk/pull/10722)). Fixes vector-im/element-web#17520.
27+
* Fix all rooms search generating permalinks to wrong room id ([\#10625](https://github.com/matrix-org/matrix-react-sdk/pull/10625)). Fixes vector-im/element-web#25115.
28+
* Posthog properly handle Analytics ID changing from under us ([\#10702](https://github.com/matrix-org/matrix-react-sdk/pull/10702)). Fixes vector-im/element-web#25187.
29+
* Fix Clock being read as an absolute time rather than duration ([\#10706](https://github.com/matrix-org/matrix-react-sdk/pull/10706)). Fixes vector-im/element-web#22582.
30+
* Properly translate errors in `ChangePassword.tsx` so they show up translated to the user but not in our logs ([\#10615](https://github.com/matrix-org/matrix-react-sdk/pull/10615)). Fixes vector-im/element-web#9597. Contributed by @MadLittleMods.
31+
* Honour feature toggles in guest mode ([\#10651](https://github.com/matrix-org/matrix-react-sdk/pull/10651)). Fixes vector-im/element-web#24513. Contributed by @andybalaam.
32+
* Fix default content in devtools event sender ([\#10699](https://github.com/matrix-org/matrix-react-sdk/pull/10699)). Contributed by @tulir.
33+
* Fix a crash when a call ends while you're in it ([\#10681](https://github.com/matrix-org/matrix-react-sdk/pull/10681)). Fixes vector-im/element-web#25153.
34+
* Fix lack of screen reader indication when triggering auto complete ([\#10664](https://github.com/matrix-org/matrix-react-sdk/pull/10664)). Fixes vector-im/element-web#11011.
35+
* Fix typing tile duplicating users ([\#10678](https://github.com/matrix-org/matrix-react-sdk/pull/10678)). Fixes vector-im/element-web#25165.
36+
* Fix wrong room topic tooltip position ([\#10667](https://github.com/matrix-org/matrix-react-sdk/pull/10667)). Fixes vector-im/element-web#25158.
37+
* Fix create subspace dialog not working ([\#10652](https://github.com/matrix-org/matrix-react-sdk/pull/10652)). Fixes vector-im/element-web#24882.
38+
139
Changes in [3.71.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.71.1) (2023-04-25)
240
=====================================================================================================
341

cypress.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineConfig({
2727
return require("./cypress/plugins/index.ts").default(on, config);
2828
},
2929
baseUrl: "http://localhost:8080",
30-
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
30+
specPattern: "cypress/e2e/**/*.spec.{js,jsx,ts,tsx}",
3131
},
3232
env: {
3333
// Docker tag to use for `ghcr.io/matrix-org/sliding-sync` image.

cypress/e2e/audio-player/audio-player.spec.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ describe("Audio player", () => {
204204
// Assert that the counter is zero before clicking the play button
205205
cy.contains(".mx_AudioPlayer_seek [role='timer']", "00:00").should("exist");
206206

207-
// Find and click "Play" button
208-
cy.findByRole("button", { name: "Play" }).click();
207+
// Find and click "Play" button, the wait is to make the test less flaky
208+
cy.findByRole("button", { name: "Play" }).should("exist");
209+
cy.wait(500).findByRole("button", { name: "Play" }).click();
209210

210211
// Assert that "Pause" button can be found
211212
cy.findByRole("button", { name: "Pause" }).should("exist");
@@ -339,8 +340,9 @@ describe("Audio player", () => {
339340
// Assert that the counter is zero before clicking the play button
340341
cy.contains(".mx_AudioPlayer_seek [role='timer']", "00:00").should("exist");
341342

342-
// Find and click "Play" button
343-
cy.findByRole("button", { name: "Play" }).click();
343+
// Find and click "Play" button, the wait is to make the test less flaky
344+
cy.findByRole("button", { name: "Play" }).should("exist");
345+
cy.wait(500).findByRole("button", { name: "Play" }).click();
344346

345347
// Assert that "Pause" button can be found
346348
cy.findByRole("button", { name: "Pause" }).should("exist");
@@ -349,7 +351,7 @@ describe("Audio player", () => {
349351
cy.contains(".mx_AudioPlayer_seek [role='timer']", "00:00").should("exist");
350352

351353
// Assert that "Play" button can be found
352-
cy.findByRole("button", { name: "Play" }).should("exist");
354+
cy.findByRole("button", { name: "Play" }).should("exist").should("not.have.attr", "disabled");
353355
});
354356
})
355357
.realHover()

cypress/e2e/composer/composer.spec.ts

+64
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,70 @@ describe("Composer", () => {
117117
cy.viewRoomByName("Composing Room");
118118
});
119119

120+
describe("Commands", () => {
121+
// TODO add tests for rich text mode
122+
123+
describe("Plain text mode", () => {
124+
it("autocomplete behaviour tests", () => {
125+
// Select plain text mode after composer is ready
126+
cy.get("div[contenteditable=true]").should("exist");
127+
cy.findByRole("button", { name: "Hide formatting" }).click();
128+
129+
// Typing a single / displays the autocomplete menu and contents
130+
cy.findByRole("textbox").type("/");
131+
132+
// Check that the autocomplete options are visible and there are more than 0 items
133+
cy.findByTestId("autocomplete-wrapper").should("not.be.empty");
134+
135+
// Entering `//` or `/ ` hides the autocomplete contents
136+
// Add an extra slash for `//`
137+
cy.findByRole("textbox").type("/");
138+
cy.findByTestId("autocomplete-wrapper").should("be.empty");
139+
// Remove the extra slash to go back to `/`
140+
cy.findByRole("textbox").type("{Backspace}");
141+
cy.findByTestId("autocomplete-wrapper").should("not.be.empty");
142+
// Add a trailing space for `/ `
143+
cy.findByRole("textbox").type(" ");
144+
cy.findByTestId("autocomplete-wrapper").should("be.empty");
145+
146+
// Typing a command that takes no arguments (/devtools) and selecting by click works
147+
cy.findByRole("textbox").type("{Backspace}dev");
148+
cy.findByTestId("autocomplete-wrapper").within(() => {
149+
cy.findByText("/devtools").click();
150+
});
151+
// Check it has closed the autocomplete and put the text into the composer
152+
cy.findByTestId("autocomplete-wrapper").should("not.be.visible");
153+
cy.findByRole("textbox").within(() => {
154+
cy.findByText("/devtools").should("exist");
155+
});
156+
// Send the message and check the devtools dialog appeared, then close it
157+
cy.findByRole("button", { name: "Send message" }).click();
158+
cy.findByRole("dialog").within(() => {
159+
cy.findByText("Developer Tools").should("exist");
160+
});
161+
cy.findByRole("button", { name: "Close dialog" }).click();
162+
163+
// Typing a command that takes arguments (/spoiler) and selecting with enter works
164+
cy.findByRole("textbox").type("/spoil");
165+
cy.findByTestId("autocomplete-wrapper").within(() => {
166+
cy.findByText("/spoiler").should("exist");
167+
});
168+
cy.findByRole("textbox").type("{Enter}");
169+
// Check it has closed the autocomplete and put the text into the composer
170+
cy.findByTestId("autocomplete-wrapper").should("not.be.visible");
171+
cy.findByRole("textbox").within(() => {
172+
cy.findByText("/spoiler").should("exist");
173+
});
174+
// Enter some more text, then send the message
175+
cy.findByRole("textbox").type("this is the spoiler text ");
176+
cy.findByRole("button", { name: "Send message" }).click();
177+
// Check that a spoiler item has appeared in the timeline and contains the spoiler command text
178+
cy.get("span.mx_EventTile_spoiler").should("exist");
179+
cy.findByText("this is the spoiler text").should("exist");
180+
});
181+
});
182+
});
183+
120184
it("sends a message when you click send or press Enter", () => {
121185
// Type a message
122186
cy.get("div[contenteditable=true]").type("my message 0");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/*
2+
Copyright 2023 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 type { VerificationRequest } from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
18+
import { HomeserverInstance } from "../../plugins/utils/homeserver";
19+
import { handleVerificationRequest, waitForVerificationRequest } from "./utils";
20+
import { CypressBot } from "../../support/bot";
21+
22+
describe("Complete security", () => {
23+
let homeserver: HomeserverInstance;
24+
25+
beforeEach(() => {
26+
cy.startHomeserver("default").then((data) => {
27+
homeserver = data;
28+
});
29+
// visit the login page of the app, to load the matrix sdk
30+
cy.visit("/#/login");
31+
32+
// wait for the page to load
33+
cy.window({ log: false }).should("have.property", "matrixcs");
34+
});
35+
36+
afterEach(() => {
37+
cy.stopHomeserver(homeserver);
38+
});
39+
40+
it("should go straight to the welcome screen if we have no signed device", () => {
41+
const username = Cypress._.uniqueId("user_");
42+
const password = "supersecret";
43+
cy.registerUser(homeserver, username, password, "Jeff");
44+
logIntoElement(homeserver.baseUrl, username, password);
45+
cy.findByText("Welcome Jeff");
46+
});
47+
48+
it("should walk through device verification if we have a signed device", () => {
49+
// create a new user, and have it bootstrap cross-signing
50+
let botClient: CypressBot;
51+
cy.getBot(homeserver, { displayName: "Jeff" })
52+
.then(async (bot) => {
53+
botClient = bot;
54+
await bot.bootstrapCrossSigning({});
55+
})
56+
.then(() => {
57+
// now log in, in Element. We go in through the login page because otherwise the device setup flow
58+
// doesn't get triggered
59+
console.log("%cAccount set up; logging in user", "font-weight: bold; font-size:x-large");
60+
logIntoElement(homeserver.baseUrl, botClient.getSafeUserId(), botClient.__cypress_password);
61+
62+
// we should see a prompt for a device verification
63+
cy.findByRole("heading", { name: "Verify this device" });
64+
const botVerificationRequestPromise = waitForVerificationRequest(botClient);
65+
cy.findByRole("button", { name: "Verify with another device" }).click();
66+
67+
// accept the verification request on the "bot" side
68+
cy.wrap(botVerificationRequestPromise).then(async (verificationRequest: VerificationRequest) => {
69+
await verificationRequest.accept();
70+
await handleVerificationRequest(verificationRequest);
71+
});
72+
73+
// confirm that the emojis match
74+
cy.findByRole("button", { name: "They match" }).click();
75+
76+
// we should get the confirmation box
77+
cy.findByText(/You've successfully verified/);
78+
79+
cy.findByRole("button", { name: "Got it" }).click();
80+
});
81+
});
82+
});
83+
84+
/**
85+
* Fill in the login form in element with the given creds
86+
*/
87+
function logIntoElement(homeserverUrl: string, username: string, password: string) {
88+
cy.visit("/#/login");
89+
90+
// select homeserver
91+
cy.findByRole("button", { name: "Edit" }).click();
92+
cy.findByRole("textbox", { name: "Other homeserver" }).type(homeserverUrl);
93+
cy.findByRole("button", { name: "Continue" }).click();
94+
95+
// wait for the dialog to go away
96+
cy.get(".mx_ServerPickerDialog").should("not.exist");
97+
98+
cy.findByRole("textbox", { name: "Username" }).type(username);
99+
cy.findByPlaceholderText("Password").type(password);
100+
cy.findByRole("button", { name: "Sign in" }).click();
101+
}

cypress/e2e/crypto/crypto.spec.ts

+3-34
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,18 @@ limitations under the License.
1616

1717
import type { ISendEventResponse, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
1818
import type { VerificationRequest } from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
19-
import type { ISasEvent } from "matrix-js-sdk/src/crypto/verification/SAS";
2019
import type { CypressBot } from "../../support/bot";
2120
import { HomeserverInstance } from "../../plugins/utils/homeserver";
22-
import Chainable = Cypress.Chainable;
2321
import { UserCredentials } from "../../support/login";
22+
import { EmojiMapping, handleVerificationRequest, waitForVerificationRequest } from "./utils";
2423

25-
type EmojiMapping = [emoji: string, name: string];
2624
interface CryptoTestContext extends Mocha.Context {
2725
homeserver: HomeserverInstance;
2826
bob: CypressBot;
2927
}
3028

31-
const waitForVerificationRequest = (cli: MatrixClient): Promise<VerificationRequest> => {
32-
return new Promise<VerificationRequest>((resolve) => {
33-
const onVerificationRequestEvent = (request: VerificationRequest) => {
34-
// @ts-ignore CryptoEvent is not exported to window.matrixcs; using the string value here
35-
cli.off("crypto.verification.request", onVerificationRequestEvent);
36-
resolve(request);
37-
};
38-
// @ts-ignore
39-
cli.on("crypto.verification.request", onVerificationRequestEvent);
40-
});
41-
};
42-
4329
const openRoomInfo = () => {
44-
cy.get(".mx_RightPanel_roomSummaryButton").click();
30+
cy.findByRole("button", { name: "Room info" }).click();
4531
return cy.get(".mx_RightPanel");
4632
};
4733

@@ -117,23 +103,6 @@ function autoJoin(client: MatrixClient) {
117103
});
118104
}
119105

120-
const handleVerificationRequest = (request: VerificationRequest): Chainable<EmojiMapping[]> => {
121-
return cy.wrap(
122-
new Promise<EmojiMapping[]>((resolve) => {
123-
const onShowSas = (event: ISasEvent) => {
124-
verifier.off("show_sas", onShowSas);
125-
event.confirm();
126-
verifier.done();
127-
resolve(event.sas.emoji);
128-
};
129-
130-
const verifier = request.beginKeyVerification("m.sas.v1");
131-
verifier.on("show_sas", onShowSas);
132-
verifier.verify();
133-
}),
134-
);
135-
};
136-
137106
const verify = function (this: CryptoTestContext) {
138107
const bobsVerificationRequestPromise = waitForVerificationRequest(this.bob);
139108

@@ -150,7 +119,7 @@ const verify = function (this: CryptoTestContext) {
150119
.as("bobsVerificationRequest");
151120
cy.findByRole("button", { name: "Verify by emoji" }).click();
152121
cy.get<VerificationRequest>("@bobsVerificationRequest").then((request: VerificationRequest) => {
153-
return handleVerificationRequest(request).then((emojis: EmojiMapping[]) => {
122+
return cy.wrap(handleVerificationRequest(request)).then((emojis: EmojiMapping[]) => {
154123
cy.get(".mx_VerificationShowSas_emojiSas_block").then((emojiBlocks) => {
155124
emojis.forEach((emoji: EmojiMapping, index: number) => {
156125
expect(emojiBlocks[index].textContent.toLowerCase()).to.eq(emoji[0] + emoji[1]);

cypress/e2e/crypto/decryption-failure.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const handleVerificationRequest = (request: VerificationRequest): Chainable<Emoj
6060
const checkTimelineNarrow = (button = true) => {
6161
cy.viewport(800, 600); // SVGA
6262
cy.get(".mx_LeftPanel_minimized").should("exist"); // Wait until the left panel is minimized
63-
cy.get(".mx_RightPanel_roomSummaryButton").click(); // Open the right panel to make the timeline narrow
63+
cy.findByRole("button", { name: "Room info" }).click(); // Open the right panel to make the timeline narrow
6464
cy.get(".mx_BaseCard").should("exist");
6565

6666
// Ensure the failure bar does not cover the timeline
@@ -74,7 +74,7 @@ const checkTimelineNarrow = (button = true) => {
7474
cy.get("[data-testid='decryption-failure-bar-button']:last-of-type").should("be.visible");
7575
}
7676

77-
cy.get(".mx_RightPanel_roomSummaryButton").click(); // Close the right panel
77+
cy.findByRole("button", { name: "Room info" }).click(); // Close the right panel
7878
cy.get(".mx_BaseCard").should("not.exist");
7979
cy.viewport(1000, 660); // Reset to the default size
8080
};

0 commit comments

Comments
 (0)