Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 9125480

Browse files
authored
Merge branch 'develop' into prbranch
2 parents fc731cf + 65b518d commit 9125480

28 files changed

+82
-204
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
Changes in [3.78.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.78.0) (2023-08-15)
2+
=====================================================================================================
3+
4+
## 🦖 Deprecations
5+
* Deprecate camelCase config options ([\#11261](https://github.com/matrix-org/matrix-react-sdk/pull/11261)).
6+
7+
## ✨ Features
8+
* Allow knocking rooms ([\#11353](https://github.com/matrix-org/matrix-react-sdk/pull/11353)). Contributed by @charlynguyen.
9+
* Support adding space-restricted joins on rooms not members of those spaces ([\#9017](https://github.com/matrix-org/matrix-react-sdk/pull/9017)). Fixes vector-im/element-web#19213.
10+
* Clear requiresClient and show pop-out if widget-api fails to ready ([\#11321](https://github.com/matrix-org/matrix-react-sdk/pull/11321)). Fixes vector-im/customer-retainer#73.
11+
* Bump pagination sizes due to hidden events ([\#11342](https://github.com/matrix-org/matrix-react-sdk/pull/11342)).
12+
* Remove display of key backup signatures from backup settings ([\#11333](https://github.com/matrix-org/matrix-react-sdk/pull/11333)).
13+
* Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity ([\#11222](https://github.com/matrix-org/matrix-react-sdk/pull/11222)). Fixes vector-im/element-web#9478.
14+
15+
## 🐛 Bug Fixes
16+
* Fix "Export chat" not respecting configured time format in plain text mode ([\#10696](https://github.com/matrix-org/matrix-react-sdk/pull/10696)). Fixes vector-im/element-web#23838. Contributed by @rashmitpankhania.
17+
* Fix some missing 1-count pluralisations around event list summaries ([\#11371](https://github.com/matrix-org/matrix-react-sdk/pull/11371)). Fixes vector-im/element-web#25925.
18+
* Fix create subspace dialog not working for public space creation ([\#11367](https://github.com/matrix-org/matrix-react-sdk/pull/11367)). Fixes vector-im/element-web#25916.
19+
* Search for users on paste ([\#11304](https://github.com/matrix-org/matrix-react-sdk/pull/11304)). Fixes vector-im/element-web#17523. Contributed by @peterscheu-aceart.
20+
* Fix AppTile context menu not always showing up when it has options ([\#11358](https://github.com/matrix-org/matrix-react-sdk/pull/11358)). Fixes vector-im/element-web#25914.
21+
* Fix clicking on home all rooms space notification not working ([\#11337](https://github.com/matrix-org/matrix-react-sdk/pull/11337)). Fixes vector-im/element-web#22844.
22+
* Fix joining a suggested room switching space away ([\#11347](https://github.com/matrix-org/matrix-react-sdk/pull/11347)). Fixes vector-im/element-web#25838.
23+
* Fix home/all rooms context menu in space panel ([\#11350](https://github.com/matrix-org/matrix-react-sdk/pull/11350)). Fixes vector-im/element-web#25896.
24+
* Make keyboard handling in and out of autocomplete completions consistent ([\#11344](https://github.com/matrix-org/matrix-react-sdk/pull/11344)). Fixes vector-im/element-web#25878.
25+
* De-duplicate reactions by sender to account for faulty/malicious servers ([\#11340](https://github.com/matrix-org/matrix-react-sdk/pull/11340)). Fixes vector-im/element-web#25872.
26+
* Fix disable_3pid_login being ignored for the email field ([\#11335](https://github.com/matrix-org/matrix-react-sdk/pull/11335)). Fixes vector-im/element-web#25863.
27+
* Upgrade wysiwyg editor for ctrl+backspace windows fix ([\#11324](https://github.com/matrix-org/matrix-react-sdk/pull/11324)). Fixes vector-im/verticals-internal#102.
28+
* Unhide the view source event toggle - it works well enough ([\#11336](https://github.com/matrix-org/matrix-react-sdk/pull/11336)). Fixes vector-im/element-web#25861.
29+
130
Changes in [3.77.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.77.1) (2023-08-04)
231
=====================================================================================================
332

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-react-sdk",
3-
"version": "3.77.1",
3+
"version": "3.78.0",
44
"description": "SDK for matrix.org using React",
55
"author": "matrix.org",
66
"repository": {

src/AddThreepid.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,15 @@ export default class AddThreepid {
281281
): Promise<[success?: boolean, result?: IAuthData | Error | null] | undefined> {
282282
const authClient = new IdentityAuthClient();
283283

284-
let result: { success: boolean } | MatrixError;
285284
if (this.submitUrl) {
286-
result = await this.matrixClient.submitMsisdnTokenOtherUrl(
285+
await this.matrixClient.submitMsisdnTokenOtherUrl(
287286
this.submitUrl,
288287
this.sessionId!,
289288
this.clientSecret,
290289
msisdnToken,
291290
);
292291
} else if (this.bind) {
293-
result = await this.matrixClient.submitMsisdnToken(
292+
await this.matrixClient.submitMsisdnToken(
294293
this.sessionId!,
295294
this.clientSecret,
296295
msisdnToken,
@@ -299,9 +298,6 @@ export default class AddThreepid {
299298
} else {
300299
throw new UserFriendlyError("The add / bind with MSISDN flow is misconfigured");
301300
}
302-
if (result instanceof Error) {
303-
throw result;
304-
}
305301

306302
if (this.bind) {
307303
await this.matrixClient.bindThreePid({

src/BasePlatform.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default abstract class BasePlatform {
6767
protected notificationCount = 0;
6868
protected errorDidOccur = false;
6969

70-
public constructor() {
70+
protected constructor() {
7171
dis.register(this.onAction);
7272
this.startUpdateCheck = this.startUpdateCheck.bind(this);
7373
}
@@ -365,14 +365,7 @@ export default abstract class BasePlatform {
365365
return null;
366366
}
367367

368-
const additionalData = new Uint8Array(userId.length + deviceId.length + 1);
369-
for (let i = 0; i < userId.length; i++) {
370-
additionalData[i] = userId.charCodeAt(i);
371-
}
372-
additionalData[userId.length] = 124; // "|"
373-
for (let i = 0; i < deviceId.length; i++) {
374-
additionalData[userId.length + 1 + i] = deviceId.charCodeAt(i);
375-
}
368+
const additionalData = this.getPickleAdditionalData(userId, deviceId);
376369

377370
try {
378371
const key = await crypto.subtle.decrypt(
@@ -387,6 +380,18 @@ export default abstract class BasePlatform {
387380
}
388381
}
389382

383+
private getPickleAdditionalData(userId: string, deviceId: string): Uint8Array {
384+
const additionalData = new Uint8Array(userId.length + deviceId.length + 1);
385+
for (let i = 0; i < userId.length; i++) {
386+
additionalData[i] = userId.charCodeAt(i);
387+
}
388+
additionalData[userId.length] = 124; // "|"
389+
for (let i = 0; i < deviceId.length; i++) {
390+
additionalData[userId.length + 1 + i] = deviceId.charCodeAt(i);
391+
}
392+
return additionalData;
393+
}
394+
390395
/**
391396
* Create and store a pickle key for encrypting libolm objects.
392397
* @param {string} userId the user ID for the user that the pickle key is for.
@@ -408,15 +413,7 @@ export default abstract class BasePlatform {
408413
const iv = new Uint8Array(32);
409414
crypto.getRandomValues(iv);
410415

411-
const additionalData = new Uint8Array(userId.length + deviceId.length + 1);
412-
for (let i = 0; i < userId.length; i++) {
413-
additionalData[i] = userId.charCodeAt(i);
414-
}
415-
additionalData[userId.length] = 124; // "|"
416-
for (let i = 0; i < deviceId.length; i++) {
417-
additionalData[userId.length + 1 + i] = deviceId.charCodeAt(i);
418-
}
419-
416+
const additionalData = this.getPickleAdditionalData(userId, deviceId);
420417
const encrypted = await crypto.subtle.encrypt({ name: "AES-GCM", iv, additionalData }, cryptoKey, randomArray);
421418

422419
try {

src/IdentityAuthClient.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ export default class IdentityAuthClient {
7575
return window.localStorage.getItem("mx_is_access_token");
7676
}
7777

78-
public hasCredentials(): boolean {
79-
return Boolean(this.accessToken);
80-
}
81-
8278
// Returns a promise that resolves to the access_token string from the IS
8379
public async getAccessToken({ check = true } = {}): Promise<string | null> {
8480
if (!this.authEnabled) {

src/LegacyCallHandler.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,6 @@ export default class LegacyCallHandler extends EventEmitter {
429429
return this.calls.get(roomId) || null;
430430
}
431431

432-
public getAnyActiveCall(): MatrixCall | null {
433-
for (const call of this.calls.values()) {
434-
if (call.state !== CallState.Ended) {
435-
return call;
436-
}
437-
}
438-
return null;
439-
}
440-
441432
public getAllActiveCalls(): MatrixCall[] {
442433
const activeCalls: MatrixCall[] = [];
443434

src/PasswordReset.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -47,41 +47,6 @@ export default class PasswordReset {
4747
this.clientSecret = this.client.generateClientSecret();
4848
}
4949

50-
/**
51-
* Attempt to reset the user's password. This will trigger a side-effect of
52-
* sending an email to the provided email address.
53-
* @param {string} emailAddress The email address
54-
* @param {string} newPassword The new password for the account.
55-
* @param {boolean} logoutDevices Should all devices be signed out after the reset? Defaults to `true`.
56-
* @return {Promise} Resolves when the email has been sent. Then call checkEmailLinkClicked().
57-
*/
58-
public async resetPassword(
59-
emailAddress: string,
60-
newPassword: string,
61-
logoutDevices = true,
62-
): Promise<IRequestTokenResponse> {
63-
this.password = newPassword;
64-
this.logoutDevices = logoutDevices;
65-
this.sendAttempt++;
66-
67-
try {
68-
const result = await this.client.requestPasswordEmailToken(
69-
emailAddress,
70-
this.clientSecret,
71-
this.sendAttempt,
72-
);
73-
this.sessionId = result.sid;
74-
return result;
75-
} catch (err: any) {
76-
if (err.errcode === "M_THREEPID_NOT_FOUND") {
77-
err.message = _t("This email address was not found");
78-
} else if (err.httpStatus) {
79-
err.message = err.message + ` (Status ${err.httpStatus})`;
80-
}
81-
throw err;
82-
}
83-
}
84-
8550
/**
8651
* Request a password reset token.
8752
* This will trigger a side-effect of sending an email to the provided email address.

src/RoomNotifs.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,8 @@ export function determineUnreadState(
256256
return { symbol: null, count: trueCount, color: NotificationColor.Grey };
257257
}
258258

259-
// We don't have any notified messages, but we might have unread messages. Let's
260-
// find out.
261-
let hasUnread = false;
259+
// We don't have any notified messages, but we might have unread messages. Let's find out.
260+
let hasUnread: boolean;
262261
if (threadId) hasUnread = doesRoomOrThreadHaveUnreadMessages(room.getThread(threadId)!);
263262
else hasUnread = doesRoomHaveUnreadMessages(room);
264263

src/ScalarMessaging.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ function canSendEvent(event: MessageEvent<any>, roomId: string): void {
679679
}
680680
const me = client.credentials.userId!;
681681

682-
let canSend = false;
682+
let canSend: boolean;
683683
if (isState) {
684684
canSend = room.currentState.maySendStateEvent(evType, me);
685685
} else {

src/components/views/dialogs/FeedbackDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
117117
return (
118118
<QuestionDialog
119119
className="mx_FeedbackDialog"
120-
hasCancelButton={!!hasFeedback}
120+
hasCancelButton={hasFeedback}
121121
title={_t("Feedback")}
122122
description={
123123
<React.Fragment>

0 commit comments

Comments
 (0)