From cabe14d7e28cefbc15b46f5e9fc56be7ee67904e Mon Sep 17 00:00:00 2001 From: ElementRobot Date: Fri, 20 Jan 2023 12:13:36 +0000 Subject: [PATCH 1/3] replace .at(-1) with array.length-1 (#3080) (#3081) (cherry picked from commit baeb4acddf718eea7e286761a5c9ee5136993a88) Co-authored-by: Germain --- src/models/thread.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/thread.ts b/src/models/thread.ts index 31587bbafb7..b688d12ac11 100644 --- a/src/models/thread.ts +++ b/src/models/thread.ts @@ -572,7 +572,7 @@ export class Thread extends ReadReceipt { */ public getEventReadUpTo(userId: string, ignoreSynthesized?: boolean): string | null { const isCurrentUser = userId === this.client.getUserId(); - const lastReply = this.timeline.at(-1); + const lastReply = this.timeline[this.timeline.length - 1]; if (isCurrentUser && lastReply) { // If the last activity in a thread is prior to the first threaded read receipt // sent in the room (suggesting that it was sent before the user started From dcd8f91e02ee68d1439fa1a7b32a994cf69d7ef5 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 20 Jan 2023 12:26:57 +0000 Subject: [PATCH 2/3] Prepare changelog for v23.1.1 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ab66068d20..61aab404856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Changes in [23.1.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v23.1.1) (2023-01-20) +================================================================================================== + +## 🐛 Bug Fixes + * Fix backwards compability for environment not support Array.prototype.at ([\#3080](https://github.com/matrix-org/matrix-js-sdk/pull/3080)). + Changes in [23.1.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v23.1.0) (2023-01-18) ================================================================================================== From 8408f36c12eb942d873ecede48deb199e506f7ec Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 20 Jan 2023 12:26:59 +0000 Subject: [PATCH 3/3] v23.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c5c9851618..ab0427a88de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-js-sdk", - "version": "23.1.0", + "version": "23.1.1", "description": "Matrix Client-Server SDK for Javascript", "engines": { "node": ">=16.0.0"