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) ================================================================================================== 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" 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