Skip to content

Merge develop into livekit #3569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 76 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
387b348
Prepare changelog for v26.1.0-rc1
RiotRobot Jun 13, 2023
7b31661
v26.1.0-rc1
RiotRobot Jun 13, 2023
d14fc42
Update dependency eslint-plugin-jsdoc to v46 (#3468)
renovate[bot] Jun 14, 2023
0545f6d
ElementR: Add `rust-crypto#createRecoveryKeyFromPassphrase` implement…
florianduros Jun 14, 2023
c425945
Avoid deprecated classes in verification integ test (#3473)
richvdh Jun 15, 2023
9b5b533
Close IDB database before deleting it to prevent spurious unexpected …
t3chguy Jun 15, 2023
1bae10c
Fix export type `GeneratedSecretStorageKey` (#3479)
florianduros Jun 15, 2023
22f0b78
Add new methods for verification to `CryptoApi` (#3474)
richvdh Jun 15, 2023
f938d10
remove polls from room state on redaction (#3475)
Jun 15, 2023
afc7052
Update definitelyTyped (#3465)
renovate[bot] Jun 16, 2023
9c62d15
Specify git tags for cypress workflow so updating tests is gated by r…
t3chguy Jun 19, 2023
80cdbe1
Element-R: implement `userHasCrossSigningKeys` (#3488)
richvdh Jun 19, 2023
8df4be0
Fix order of things in `crypto-api.ts` (#3491)
richvdh Jun 20, 2023
49f1157
ElementR: Add `CryptoApi#bootstrapSecretStorage` (#3483)
florianduros Jun 20, 2023
c84efb5
Prepare changelog for v26.1.0
RiotRobot Jun 20, 2023
f03fbed
v26.1.0
RiotRobot Jun 20, 2023
8d93f49
Merge branch 'master' into develop
RiotRobot Jun 20, 2023
b77fe46
Resetting package fields for development
RiotRobot Jun 20, 2023
9c6d5a6
Element-R: wait for OlmMachine on startup (#3487)
richvdh Jun 20, 2023
ca00094
Fix bug where switching media caused media in subsequent calls to fai…
dbkr Jun 20, 2023
8b9672b
Add debug logging to figure out missing reactions in main timeline (#…
t3chguy Jun 20, 2023
80fec81
Add getLastUnthreadedReceiptFor utility to Thread delegating to the u…
t3chguy Jun 21, 2023
df78d7c
OIDC: add dynamic client registration util function (#3481)
Jun 21, 2023
e8c89e9
Element-R: speed up slow unit test (#3492)
richvdh Jun 22, 2023
c8f6c4d
Increase crypto test timeout (#3500)
richvdh Jun 23, 2023
3c59476
Element-R: Store cross signing keys in secret storage (#3498)
florianduros Jun 23, 2023
f884c78
Improve integration test for interactive verification (#3495)
richvdh Jun 23, 2023
f16a6bc
Aggregate relations regardless of whether event fits into the timelin…
t3chguy Jun 26, 2023
48c4127
Element-R: Basic implementation of SAS verification (#3490)
richvdh Jun 26, 2023
3e646bd
Bump version of the react-sdk cypress workflow file (#3501)
richvdh Jun 26, 2023
96e484a
Element-R: implement `CryptoApi.getVerificationRequestsToDeviceInProg…
richvdh Jun 26, 2023
bd66e38
Element R: Implement `requestOwnUserVerification` (#3508)
richvdh Jun 26, 2023
e8fb47f
Update all non-major dependencies (#3467)
renovate[bot] Jun 26, 2023
326a13b
Rearrange the verification integration tests, again (#3504)
richvdh Jun 26, 2023
d1dec4c
Implement `VerificationRequest.cancel` (#3505)
richvdh Jun 26, 2023
b703d4a
More slow test fixes (#3515)
richvdh Jun 26, 2023
9de4a05
OIDC: navigate to authorization endpoint (#3499)
Jun 26, 2023
4382d2a
Increase another crypto test timeout (#3509)
richvdh Jun 27, 2023
2af0706
Prepare changelog for v26.2.0-rc.1
RiotRobot Jun 27, 2023
e285932
v26.2.0-rc.1
RiotRobot Jun 27, 2023
5a68861
Update all non-major dependencies (#3513)
renovate[bot] Jun 27, 2023
1862616
Create a new event type for verification requests (#3514)
richvdh Jun 27, 2023
ff29de7
Update README.md
t3chguy Jun 27, 2023
e4a9f95
Update peter-evans/create-pull-request digest to 1534078 (#3518)
renovate[bot] Jun 27, 2023
5a3d1a2
Update typescript-eslint monorepo to v5.60.0 (#3519)
renovate[bot] Jun 27, 2023
815484b
Update dependency eslint-plugin-jsdoc to v46.3.0 (#3520)
renovate[bot] Jun 27, 2023
acbcb46
Force coloured output from jest (#3521)
richvdh Jun 27, 2023
de64779
Improve types to match reality (#3510)
t3chguy Jun 28, 2023
e645af1
use the right smiley in emoji verification (#3523)
richvdh Jun 28, 2023
24cee68
Rust crypto: emit `VerificationRequestReceived` events (#3525)
richvdh Jun 28, 2023
1828826
QRCode: fix breakage on node 16 (#3527)
richvdh Jun 29, 2023
5165899
Element-R: support for starting a SAS verification (#3528)
richvdh Jun 29, 2023
722debe
Drop support for Node 16 (#3533)
richvdh Jun 29, 2023
c271e15
Use the right anchor emoji for SAS verification (#3534)
richvdh Jun 29, 2023
3a8a138
Element-R: Implement `VerificationRequest.accept` (#3526)
richvdh Jul 3, 2023
3a694f4
Element-R: Implement `VerificationRequest.{timeout,pending}` (#3532)
richvdh Jul 3, 2023
09de76b
OIDC: validate id token (#3531)
Jul 3, 2023
5be4548
Fix an instance of failed to decrypt error when an in flight `/keys/q…
erikjohnston Jul 4, 2023
89cabc4
Ignore thread relations on state events for consistency with edits (#…
t3chguy Jul 4, 2023
1c1ac13
Improve types around login, registration, UIA and identity servers (#…
t3chguy Jul 4, 2023
12a94bd
Prepare changelog for v26.2.0
RiotRobot Jul 4, 2023
3f095ca
v26.2.0
RiotRobot Jul 4, 2023
40a7110
Merge branch 'master' into develop
RiotRobot Jul 4, 2023
5751df1
Resetting package fields for development
RiotRobot Jul 4, 2023
8e3f2f3
Log message ID for undecryptable to-device messages (#3543)
richvdh Jul 6, 2023
592c497
Upgrade `@matrix-org/matrix-sdk-crypto-js` to `^0.1.1` (#3552)
florianduros Jul 6, 2023
5b635df
add stop() api to BackupManager for clean shutdown (#3553)
BillCarsonFr Jul 6, 2023
30dd289
Update IUnsigned type to be extensible (#3547)
t3chguy Jul 7, 2023
cd7c519
Prevent threads code from making identical simultaneous API hits (#3541)
t3chguy Jul 7, 2023
b606d1e
Don't allow Olm unwedging rate-limiting to race (#3549)
uhoreg Jul 7, 2023
b8fa030
OIDC: use `oidc-client-ts` (#3544)
Jul 9, 2023
4990bf5
Bump tough-cookie from 4.1.2 to 4.1.3 (#3560)
dependabot[bot] Jul 10, 2023
b5b86bf
Fix `TypedEventEmitter::removeAllListeners(void)` not working (#3561)
t3chguy Jul 10, 2023
2751e19
Lock file maintenance (#3392)
renovate[bot] Jul 10, 2023
e42dd74
Add async method for generating a QR code (#3562)
richvdh Jul 10, 2023
2330fa7
Merge remote-tracking branch 'upstream/develop' into SimonBrandner/me…
SimonBrandner Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = {
"jest/no-standalone-expect": [
"error",
{
additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly"],
additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly", "newBackendOnly"],
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
jobs:
cypress:
name: Cypress
uses: matrix-org/matrix-react-sdk/.github/workflows/cypress.yaml@develop
uses: matrix-org/matrix-react-sdk/.github/workflows/cypress.yaml@v3.74.0
permissions:
actions: read
issues: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/downstream-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
jobs:
build-element-web:
name: Build element-web
uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@develop
uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@v3.74.0
with:
matrix-js-sdk-sha: ${{ github.sha }}
react-sdk-repository: matrix-org/matrix-react-sdk
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
specs: [browserify, integ, unit]
node: [16, 18, latest]
node: [18, latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -50,6 +50,9 @@ jobs:
env:
JEST_SONAR_UNIQUE_OUTPUT_NAME: true

# tell jest to use coloured output
FORCE_COLOR: true

- name: Move coverage files into place
if: env.ENABLE_COVERAGE == 'true'
run: mv coverage/lcov.info coverage/${{ matrix.node }}-${{ matrix.specs }}.lcov.info
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v5
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/upgrade-deps
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
Changes in [26.2.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v26.2.0) (2023-07-04)
==================================================================================================

## 🦖 Deprecations
* The Browserify artifact is being deprecated, scheduled for removal in the October 10th release cycle. ([\#3189](https://github.com/matrix-org/matrix-js-sdk/issues/3189)).
* ElementR: Add `CryptoApi#bootstrapSecretStorage` ([\#3483](https://github.com/matrix-org/matrix-js-sdk/pull/3483)). Contributed by @florianduros.
* Deprecate `MatrixClient.findVerificationRequestDMInProgress`, `MatrixClient.getVerificationRequestsToDeviceInProgress`, and `MatrixClient.requestVerification`, in favour of methods in `CryptoApi`. ([\#3474](https://github.com/matrix-org/matrix-js-sdk/pull/3474)).
* Introduce a new `Crypto.VerificationRequest` interface, and deprecate direct access to the old `VerificationRequest` class. Also deprecate some related classes that were exported from `src/crypto/verification/request/VerificationRequest` ([\#3449](https://github.com/matrix-org/matrix-js-sdk/pull/3449)).

## ✨ Features
* OIDC: navigate to authorization endpoint ([\#3499](https://github.com/matrix-org/matrix-js-sdk/pull/3499)). Contributed by @kerryarchibald.
* Support for interactive device verification in Element-R. ([\#3505](https://github.com/matrix-org/matrix-js-sdk/pull/3505)).
* Support for interactive device verification in Element-R. ([\#3508](https://github.com/matrix-org/matrix-js-sdk/pull/3508)).
* Support for interactive device verification in Element-R. ([\#3490](https://github.com/matrix-org/matrix-js-sdk/pull/3490)). Fixes vector-im/element-web#25316.
* Element-R: Store cross signing keys in secret storage ([\#3498](https://github.com/matrix-org/matrix-js-sdk/pull/3498)). Contributed by @florianduros.
* OIDC: add dynamic client registration util function ([\#3481](https://github.com/matrix-org/matrix-js-sdk/pull/3481)). Contributed by @kerryarchibald.
* Add getLastUnthreadedReceiptFor utility to Thread delegating to the underlying Room ([\#3493](https://github.com/matrix-org/matrix-js-sdk/pull/3493)).
* ElementR: Add `rust-crypto#createRecoveryKeyFromPassphrase` implementation ([\#3472](https://github.com/matrix-org/matrix-js-sdk/pull/3472)). Contributed by @florianduros.

## 🐛 Bug Fixes
* Aggregate relations regardless of whether event fits into the timeline ([\#3496](https://github.com/matrix-org/matrix-js-sdk/pull/3496)). Fixes vector-im/element-web#25596.
* Fix bug where switching media caused media in subsequent calls to fail ([\#3489](https://github.com/matrix-org/matrix-js-sdk/pull/3489)).
* Fix: remove polls from room state on redaction ([\#3475](https://github.com/matrix-org/matrix-js-sdk/pull/3475)). Fixes vector-im/element-web#25573. Contributed by @kerryarchibald.
* Fix export type `GeneratedSecretStorageKey` ([\#3479](https://github.com/matrix-org/matrix-js-sdk/pull/3479)). Contributed by @florianduros.
* Close IDB database before deleting it to prevent spurious unexpected close errors ([\#3478](https://github.com/matrix-org/matrix-js-sdk/pull/3478)). Fixes vector-im/element-web#25597.

Changes in [26.1.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v26.1.0) (2023-06-20)
==================================================================================================

## 🦖 Deprecations
* Introduce a new `Crypto.Verifier` interface, and deprecate direct access to `VerificationBase`, `SAS` and `ReciprocateQRCode` ([\#3414](https://github.com/matrix-org/matrix-js-sdk/pull/3414)).

## ✨ Features
* Add `rust-crypto#isCrossSigningReady` implementation ([\#3462](https://github.com/matrix-org/matrix-js-sdk/pull/3462)). Contributed by @florianduros.
* OIDC: Validate `m.authentication` configuration ([\#3419](https://github.com/matrix-org/matrix-js-sdk/pull/3419)). Contributed by @kerryarchibald.
* ElementR: Add `CryptoApi.getCrossSigningStatus` ([\#3452](https://github.com/matrix-org/matrix-js-sdk/pull/3452)). Contributed by @florianduros.
* Extend stats summary with call device and user count based on room state ([\#3424](https://github.com/matrix-org/matrix-js-sdk/pull/3424)). Contributed by @toger5.
* Update MSC3912 implementation to use `with_rel_type` instead of `with_relations` ([\#3420](https://github.com/matrix-org/matrix-js-sdk/pull/3420)).
* Export thread-related types from SDK ([\#3447](https://github.com/matrix-org/matrix-js-sdk/pull/3447)). Contributed by @stas-demydiuk.
* Use correct /v3 prefix for /refresh ([\#3016](https://github.com/matrix-org/matrix-js-sdk/pull/3016)). Contributed by @davidisaaclee.

## 🐛 Bug Fixes
* Fix thread list being ordered based on all updates ([\#3458](https://github.com/matrix-org/matrix-js-sdk/pull/3458)). Fixes vector-im/element-web#25522.
* Fix: handle `baseUrl` with trailing slash in `fetch.getUrl` ([\#3455](https://github.com/matrix-org/matrix-js-sdk/pull/3455)). Fixes vector-im/element-web#25526. Contributed by @kerryarchibald.
* use cli.canSupport to determine intentional mentions support ([\#3445](https://github.com/matrix-org/matrix-js-sdk/pull/3445)). Fixes vector-im/element-web#25497. Contributed by @kerryarchibald.
* Make sliding sync linearize processing of sync requests ([\#3442](https://github.com/matrix-org/matrix-js-sdk/pull/3442)).
* Fix edge cases around 2nd order relations and threads ([\#3437](https://github.com/matrix-org/matrix-js-sdk/pull/3437)).

Changes in [26.0.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v26.0.1) (2023-06-09)
==================================================================================================

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ endpoints from before Matrix 1.1, for example.

## In a browser

### Note, the browserify build has been deprecated. Please use a bundler like webpack or vite instead.

Download the browser version from
https://github.com/matrix-org/matrix-js-sdk/releases/latest and add that as a
`<script>` to your page. There will be a global variable `matrixcs`
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "matrix-js-sdk",
"version": "26.0.1",
"version": "26.2.0",
"description": "Matrix Client-Server SDK for Javascript",
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"scripts": {
"prepublishOnly": "yarn build",
Expand Down Expand Up @@ -55,13 +55,15 @@
],
"dependencies": {
"@babel/runtime": "^7.12.5",
"@matrix-org/matrix-sdk-crypto-js": "^0.1.0-alpha.10",
"@matrix-org/matrix-sdk-crypto-js": "^0.1.1",
"another-json": "^0.2.0",
"bs58": "^5.0.0",
"content-type": "^1.0.4",
"jwt-decode": "^3.1.2",
"loglevel": "^1.7.1",
"matrix-events-sdk": "0.0.1",
"matrix-widget-api": "^1.3.1",
"oidc-client-ts": "^2.2.4",
"p-retry": "4",
"sdp-transform": "^2.14.1",
"unhomoglyph": "^1.0.6",
Expand Down Expand Up @@ -101,13 +103,13 @@
"debug": "^4.3.4",
"docdash": "^2.0.0",
"domexception": "^4.0.0",
"eslint": "8.41.0",
"eslint": "8.43.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.6",
"eslint-plugin-jsdoc": "^45.0.0",
"eslint-plugin-jsdoc": "^46.0.0",
"eslint-plugin-matrix-org": "^1.0.0",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-plugin-unicorn": "^47.0.0",
Expand Down
38 changes: 4 additions & 34 deletions spec/integ/crypto/cross-signing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import "fake-indexeddb/auto";
import { IDBFactory } from "fake-indexeddb";

import { CRYPTO_BACKENDS, InitCrypto } from "../../test-utils/test-utils";
import { createClient, MatrixClient, IAuthDict, UIAuthCallback } from "../../../src";
import { createClient, IAuthDict, MatrixClient } from "../../../src";
import { mockSetupCrossSigningRequests } from "../../test-utils/mockEndpoints";

afterEach(() => {
// reset fake-indexeddb after each test, to make sure we don't leak connections
Expand Down Expand Up @@ -62,45 +63,14 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("cross-signing (%s)", (backend: s
});

/**
* Mock the requests needed to set up cross signing
*
* Return `{}` for `GET _matrix/client/r0/user/:userId/account_data/:type` request
* Return `{}` for `POST _matrix/client/v3/keys/signatures/upload` request (named `upload-sigs` for fetchMock check)
* Return `{}` for `POST /_matrix/client/(unstable|v3)/keys/device_signing/upload` request (named `upload-keys` for fetchMock check)
*/
function mockSetupCrossSigningRequests(): void {
// have account_data requests return an empty object
fetchMock.get("express:/_matrix/client/r0/user/:userId/account_data/:type", {});

// we expect a request to upload signatures for our device ...
fetchMock.post({ url: "path:/_matrix/client/v3/keys/signatures/upload", name: "upload-sigs" }, {});

// ... and one to upload the cross-signing keys (with UIA)
fetchMock.post(
// legacy crypto uses /unstable/; /v3/ is correct
{
url: new RegExp("/_matrix/client/(unstable|v3)/keys/device_signing/upload"),
name: "upload-keys",
},
{},
);
}

/**
* Create cross-signing keys, publish the keys
* Mock and bootstrap all the required steps
* Create cross-signing keys and publish the keys
*
* @param authDict - The parameters to as the `auth` dict in the key upload request.
* @see https://spec.matrix.org/v1.6/client-server-api/#authentication-types
*/
async function bootstrapCrossSigning(authDict: IAuthDict): Promise<void> {
const uiaCallback: UIAuthCallback<void> = async (makeRequest) => {
await makeRequest(authDict);
};

// now bootstrap cross signing, and check it resolves successfully
await aliceClient.getCrypto()?.bootstrapCrossSigning({
authUploadDeviceSigningKeys: uiaCallback,
authUploadDeviceSigningKeys: (makeRequest) => makeRequest(authDict).then(() => undefined),
});
}

Expand Down
Loading