matrix-js-sdk 42.0.0 → 42.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/lib/@types/PushRules.d.ts.map +1 -1
- package/lib/@types/PushRules.js +0 -5
- package/lib/@types/PushRules.js.map +1 -1
- package/lib/@types/auth.d.ts.map +1 -1
- package/lib/@types/auth.js +0 -5
- package/lib/@types/auth.js.map +1 -1
- package/lib/@types/crypto.d.ts.map +1 -1
- package/lib/@types/crypto.js.map +1 -1
- package/lib/@types/event.d.ts +3 -1
- package/lib/@types/event.d.ts.map +1 -1
- package/lib/@types/event.js +1 -0
- package/lib/@types/event.js.map +1 -1
- package/lib/@types/extensible_events.js.map +1 -1
- package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -1
- package/lib/@types/media.js.map +1 -1
- package/lib/@types/partials.d.ts.map +1 -1
- package/lib/@types/partials.js.map +1 -1
- package/lib/@types/requests.d.ts.map +1 -1
- package/lib/@types/requests.js +0 -5
- package/lib/@types/requests.js.map +1 -1
- package/lib/@types/search.d.ts.map +1 -1
- package/lib/@types/search.js +0 -3
- package/lib/@types/search.js.map +1 -1
- package/lib/@types/spaces.d.ts.map +1 -1
- package/lib/@types/spaces.js.map +1 -1
- package/lib/@types/synapse.d.ts.map +1 -1
- package/lib/@types/synapse.js.map +1 -1
- package/lib/@types/threepids.js.map +1 -1
- package/lib/ToDeviceMessageQueue.d.ts.map +1 -1
- package/lib/ToDeviceMessageQueue.js +0 -2
- package/lib/ToDeviceMessageQueue.js.map +1 -1
- package/lib/browser-index.d.ts.map +1 -1
- package/lib/browser-index.js +3 -1
- package/lib/browser-index.js.map +1 -1
- package/lib/client.d.ts +5 -8
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +5 -46
- package/lib/client.js.map +1 -1
- package/lib/common-crypto/key-passphrase.d.ts.map +1 -1
- package/lib/common-crypto/key-passphrase.js +0 -3
- package/lib/common-crypto/key-passphrase.js.map +1 -1
- package/lib/crypto/store/base.d.ts.map +1 -1
- package/lib/crypto/store/base.js +0 -9
- package/lib/crypto/store/base.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/lib/crypto/store/localStorage-crypto-store.d.ts.map +1 -1
- package/lib/crypto/store/localStorage-crypto-store.js +0 -2
- package/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
- package/lib/crypto-api/keybackup.d.ts +13 -6
- package/lib/crypto-api/keybackup.d.ts.map +1 -1
- package/lib/crypto-api/keybackup.js.map +1 -1
- package/lib/embedded.d.ts.map +1 -1
- package/lib/embedded.js +0 -5
- package/lib/embedded.js.map +1 -1
- package/lib/feature.d.ts.map +1 -1
- package/lib/feature.js +0 -3
- package/lib/feature.js.map +1 -1
- package/lib/filter-component.d.ts.map +1 -1
- package/lib/filter-component.js +2 -5
- package/lib/filter-component.js.map +1 -1
- package/lib/filter.d.ts.map +1 -1
- package/lib/filter.js +0 -4
- package/lib/filter.js.map +1 -1
- package/lib/http-api/interface.d.ts.map +1 -1
- package/lib/http-api/interface.js.map +1 -1
- package/lib/http-api/refresh.d.ts.map +1 -1
- package/lib/http-api/refresh.js +0 -3
- package/lib/http-api/refresh.js.map +1 -1
- package/lib/interactive-auth.d.ts.map +1 -1
- package/lib/interactive-auth.js +5 -6
- package/lib/interactive-auth.js.map +1 -1
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +0 -2
- package/lib/logger.js.map +1 -1
- package/lib/matrixrtc/CallMembership.d.ts +3 -3
- package/lib/matrixrtc/CallMembership.js +5 -5
- package/lib/matrixrtc/CallMembership.js.map +1 -1
- package/lib/matrixrtc/MatrixRTCSession.d.ts +18 -1
- package/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/lib/matrixrtc/MatrixRTCSession.js +56 -4
- package/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +14 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +1 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.js +20 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
- package/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/lib/matrixrtc/MembershipManager.js +9 -6
- package/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/lib/matrixrtc/index.d.ts +1 -1
- package/lib/matrixrtc/index.d.ts.map +1 -1
- package/lib/matrixrtc/index.js +1 -1
- package/lib/matrixrtc/index.js.map +1 -1
- package/lib/matrixrtc/membershipData/rtc.d.ts +6 -3
- package/lib/matrixrtc/membershipData/rtc.d.ts.map +1 -1
- package/lib/matrixrtc/membershipData/rtc.js +7 -4
- package/lib/matrixrtc/membershipData/rtc.js.map +1 -1
- package/lib/matrixrtc/types.d.ts +19 -6
- package/lib/matrixrtc/types.d.ts.map +1 -1
- package/lib/matrixrtc/types.js +11 -1
- package/lib/matrixrtc/types.js.map +1 -1
- package/lib/models/event.d.ts.map +1 -1
- package/lib/models/event.js +0 -6
- package/lib/models/event.js.map +1 -1
- package/lib/models/room-state.d.ts.map +1 -1
- package/lib/models/room-state.js.map +1 -1
- package/lib/models/room.d.ts.map +1 -1
- package/lib/models/room.js +6 -6
- package/lib/models/room.js.map +1 -1
- package/lib/models/thread.d.ts +2 -2
- package/lib/models/thread.d.ts.map +1 -1
- package/lib/models/thread.js.map +1 -1
- package/lib/realtime-callbacks.js +0 -1
- package/lib/realtime-callbacks.js.map +1 -1
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +1 -1
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js +0 -1
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -1
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +1 -1
- package/lib/rust-crypto/OutgoingRequestProcessor.js +0 -2
- package/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
- package/lib/rust-crypto/backup.d.ts +21 -1
- package/lib/rust-crypto/backup.d.ts.map +1 -1
- package/lib/rust-crypto/backup.js +62 -21
- package/lib/rust-crypto/backup.js.map +1 -1
- package/lib/rust-crypto/device-converter.d.ts.map +1 -1
- package/lib/rust-crypto/device-converter.js +1 -0
- package/lib/rust-crypto/device-converter.js.map +1 -1
- package/lib/rust-crypto/index.d.ts +7 -0
- package/lib/rust-crypto/index.d.ts.map +1 -1
- package/lib/rust-crypto/index.js +3 -3
- package/lib/rust-crypto/index.js.map +1 -1
- package/lib/rust-crypto/libolm_migration.d.ts.map +1 -1
- package/lib/rust-crypto/libolm_migration.js +0 -2
- package/lib/rust-crypto/libolm_migration.js.map +1 -1
- package/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
- package/lib/rust-crypto/rust-crypto.js +0 -3
- package/lib/rust-crypto/rust-crypto.js.map +1 -1
- package/lib/scheduler.d.ts.map +1 -1
- package/lib/scheduler.js +0 -3
- package/lib/scheduler.js.map +1 -1
- package/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/lib/sliding-sync-sdk.js +6 -0
- package/lib/sliding-sync-sdk.js.map +1 -1
- package/lib/sliding-sync.d.ts.map +1 -1
- package/lib/sliding-sync.js +3 -0
- package/lib/sliding-sync.js.map +1 -1
- package/lib/store/indexeddb.d.ts.map +1 -1
- package/lib/store/indexeddb.js +0 -2
- package/lib/store/indexeddb.js.map +1 -1
- package/lib/store/memory.d.ts.map +1 -1
- package/lib/store/memory.js +7 -9
- package/lib/store/memory.js.map +1 -1
- package/lib/sync-accumulator.d.ts.map +1 -1
- package/lib/sync-accumulator.js +1 -5
- package/lib/sync-accumulator.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +1 -1
- package/lib/sync.js.map +1 -1
- package/lib/timeline-window.d.ts.map +1 -1
- package/lib/timeline-window.js +0 -1
- package/lib/timeline-window.js.map +1 -1
- package/lib/utils/internal/deriveKeys.d.ts.map +1 -1
- package/lib/utils/internal/deriveKeys.js +0 -1
- package/lib/utils/internal/deriveKeys.js.map +1 -1
- package/lib/webrtc/callEventTypes.d.ts.map +1 -1
- package/lib/webrtc/callEventTypes.js +0 -5
- package/lib/webrtc/callEventTypes.js.map +1 -1
- package/package.json +5 -5
- package/src/@types/PushRules.ts +0 -5
- package/src/@types/auth.ts +0 -6
- package/src/@types/crypto.ts +2 -6
- package/src/@types/event.ts +3 -0
- package/src/@types/extensible_events.ts +4 -4
- package/src/@types/matrix-sdk-crypto-wasm.d.ts +0 -1
- package/src/@types/media.ts +1 -1
- package/src/@types/partials.ts +0 -2
- package/src/@types/requests.ts +0 -5
- package/src/@types/search.ts +0 -2
- package/src/@types/spaces.ts +0 -2
- package/src/@types/synapse.ts +0 -2
- package/src/@types/threepids.ts +2 -2
- package/src/ToDeviceMessageQueue.ts +0 -2
- package/src/browser-index.ts +3 -3
- package/src/client.ts +18 -61
- package/src/common-crypto/key-passphrase.ts +0 -1
- package/src/crypto/store/base.ts +1 -8
- package/src/crypto/store/indexeddb-crypto-store-backend.ts +1 -1
- package/src/crypto/store/localStorage-crypto-store.ts +0 -1
- package/src/crypto-api/keybackup.ts +14 -7
- package/src/embedded.ts +0 -5
- package/src/feature.ts +0 -3
- package/src/filter-component.ts +1 -2
- package/src/filter.ts +0 -3
- package/src/http-api/interface.ts +0 -1
- package/src/http-api/refresh.ts +0 -1
- package/src/interactive-auth.ts +4 -4
- package/src/logger.ts +0 -2
- package/src/matrixrtc/CallMembership.ts +5 -5
- package/src/matrixrtc/MatrixRTCSession.ts +70 -3
- package/src/matrixrtc/MatrixRTCSessionManager.ts +21 -2
- package/src/matrixrtc/MembershipManager.ts +8 -5
- package/src/matrixrtc/index.ts +1 -1
- package/src/matrixrtc/membershipData/rtc.ts +18 -7
- package/src/matrixrtc/types.ts +24 -7
- package/src/models/event.ts +0 -3
- package/src/models/room-state.ts +0 -3
- package/src/models/room.ts +6 -6
- package/src/models/thread.ts +2 -2
- package/src/realtime-callbacks.ts +0 -1
- package/src/rendezvous/transports/MSC4108RendezvousSession.ts +0 -1
- package/src/rust-crypto/OutgoingRequestProcessor.ts +0 -1
- package/src/rust-crypto/backup.ts +66 -28
- package/src/rust-crypto/device-converter.ts +1 -0
- package/src/rust-crypto/index.ts +11 -0
- package/src/rust-crypto/libolm_migration.ts +0 -2
- package/src/rust-crypto/rust-crypto.ts +0 -3
- package/src/scheduler.ts +0 -3
- package/src/sliding-sync-sdk.ts +3 -0
- package/src/sliding-sync.ts +2 -0
- package/src/store/indexeddb.ts +0 -2
- package/src/store/memory.ts +7 -9
- package/src/sync-accumulator.ts +1 -3
- package/src/sync.ts +1 -3
- package/src/timeline-window.ts +0 -1
- package/src/utils/internal/deriveKeys.ts +0 -1
- package/src/webrtc/callEventTypes.ts +0 -5
package/src/client.ts
CHANGED
|
@@ -256,14 +256,8 @@ const SCROLLBACK_DELAY_MS = 3000;
|
|
|
256
256
|
|
|
257
257
|
const TURN_CHECK_INTERVAL = 10 * 60 * 1000; // poll for turn credentials every 10 minutes
|
|
258
258
|
|
|
259
|
-
export const UNSTABLE_MSC3852_LAST_SEEN_UA = new UnstableValue(
|
|
260
|
-
"last_seen_user_agent",
|
|
261
|
-
"org.matrix.msc3852.last_seen_user_agent",
|
|
262
|
-
);
|
|
263
|
-
|
|
264
259
|
export interface IKeysUploadResponse {
|
|
265
260
|
one_time_key_counts: {
|
|
266
|
-
// eslint-disable-line camelcase
|
|
267
261
|
[algorithm: string]: number;
|
|
268
262
|
};
|
|
269
263
|
}
|
|
@@ -635,7 +629,6 @@ export interface IWellKnownConfig<T = IClientWellKnown> {
|
|
|
635
629
|
action?: AutoDiscoveryAction;
|
|
636
630
|
reason?: string;
|
|
637
631
|
error?: Error | string;
|
|
638
|
-
// eslint-disable-next-line
|
|
639
632
|
base_url?: string | null;
|
|
640
633
|
// XXX: this is undocumented
|
|
641
634
|
server_name?: string;
|
|
@@ -779,13 +772,10 @@ interface IUserDirectoryResponse {
|
|
|
779
772
|
}
|
|
780
773
|
|
|
781
774
|
export interface IMyDevice {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
// UNSTABLE_MSC3852_LAST_SEEN_UA
|
|
787
|
-
"last_seen_user_agent"?: string;
|
|
788
|
-
"org.matrix.msc3852.last_seen_user_agent"?: string;
|
|
775
|
+
device_id: string;
|
|
776
|
+
display_name?: string;
|
|
777
|
+
last_seen_ip?: string;
|
|
778
|
+
last_seen_ts?: number;
|
|
789
779
|
}
|
|
790
780
|
|
|
791
781
|
export interface Keys {
|
|
@@ -898,7 +888,6 @@ interface IWhoamiResponse {
|
|
|
898
888
|
device_id?: string;
|
|
899
889
|
is_guest?: boolean;
|
|
900
890
|
}
|
|
901
|
-
/* eslint-enable camelcase */
|
|
902
891
|
|
|
903
892
|
// We're using this constant for methods overloading and inspect whether a variable
|
|
904
893
|
// contains an eventId or not. This was required to ensure backwards compatibility
|
|
@@ -1325,7 +1314,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
1325
1314
|
|
|
1326
1315
|
private serverCapabilitiesService: ServerCapabilities;
|
|
1327
1316
|
public readonly retentionPolicyService: RetentionPolicyService;
|
|
1328
|
-
// eslint-disable-next-line
|
|
1329
1317
|
public readonly _unstable_shouldApplyMessageRetention: boolean;
|
|
1330
1318
|
|
|
1331
1319
|
public constructor(opts: IMatrixClientCreateOpts) {
|
|
@@ -2349,21 +2337,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
2349
2337
|
}
|
|
2350
2338
|
|
|
2351
2339
|
public async deleteAccountData(eventType: keyof WritableAccountDataEvents): Promise<void> {
|
|
2352
|
-
|
|
2353
|
-
// if deletion is not supported overwrite with empty content
|
|
2354
|
-
if (msc3391DeleteAccountDataServerSupport === ServerSupport.Unsupported) {
|
|
2355
|
-
await this.setAccountData(eventType, {});
|
|
2356
|
-
return;
|
|
2357
|
-
}
|
|
2358
|
-
const path = utils.encodeUri("/user/$userId/account_data/$type", {
|
|
2359
|
-
$userId: this.getSafeUserId(),
|
|
2360
|
-
$type: eventType,
|
|
2361
|
-
});
|
|
2362
|
-
const options =
|
|
2363
|
-
msc3391DeleteAccountDataServerSupport === ServerSupport.Unstable
|
|
2364
|
-
? { prefix: "/_matrix/client/unstable/org.matrix.msc3391" }
|
|
2365
|
-
: undefined;
|
|
2366
|
-
return await this.http.authedRequest(Method.Delete, path, undefined, undefined, options);
|
|
2340
|
+
await this.setAccountData(eventType, {});
|
|
2367
2341
|
}
|
|
2368
2342
|
|
|
2369
2343
|
/**
|
|
@@ -2680,7 +2654,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
2680
2654
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
2681
2655
|
* @see MatrixSafetyError
|
|
2682
2656
|
*/
|
|
2683
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2684
2657
|
public async unstable_createLiveBeacon(
|
|
2685
2658
|
roomId: Room["roomId"],
|
|
2686
2659
|
beaconInfoContent: MBeaconInfoEventContent,
|
|
@@ -2696,7 +2669,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
2696
2669
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
2697
2670
|
* @see MatrixSafetyError
|
|
2698
2671
|
*/
|
|
2699
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2700
2672
|
public async unstable_setLiveBeacon(
|
|
2701
2673
|
roomId: string,
|
|
2702
2674
|
beaconInfoContent: MBeaconInfoEventContent,
|
|
@@ -3484,7 +3456,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3484
3456
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
3485
3457
|
* @see MatrixSafetyError
|
|
3486
3458
|
*/
|
|
3487
|
-
// eslint-disable-next-line
|
|
3488
3459
|
public async _unstable_sendDelayedEvent<K extends keyof TimelineEvents>(
|
|
3489
3460
|
roomId: string,
|
|
3490
3461
|
delayOpts: SendDelayedEventRequestOpts,
|
|
@@ -3519,7 +3490,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3519
3490
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
3520
3491
|
* @see MatrixSafetyError
|
|
3521
3492
|
*/
|
|
3522
|
-
// eslint-disable-next-line
|
|
3523
3493
|
public async _unstable_sendStickyDelayedEvent<K extends keyof TimelineEvents>(
|
|
3524
3494
|
roomId: string,
|
|
3525
3495
|
stickDuration: number,
|
|
@@ -3561,7 +3531,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3561
3531
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
3562
3532
|
* @see MatrixSafetyError
|
|
3563
3533
|
*/
|
|
3564
|
-
// eslint-disable-next-line
|
|
3565
3534
|
public async _unstable_sendDelayedStateEvent<K extends keyof StateEvents>(
|
|
3566
3535
|
roomId: string,
|
|
3567
3536
|
delayOpts: SendDelayedEventRequestOpts,
|
|
@@ -3597,7 +3566,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3597
3566
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
3598
3567
|
* @see MatrixSafetyError
|
|
3599
3568
|
*/
|
|
3600
|
-
// eslint-disable-next-line
|
|
3601
3569
|
public async _unstable_sendStickyEvent<K extends keyof TimelineEvents>(
|
|
3602
3570
|
roomId: string,
|
|
3603
3571
|
stickDuration: number,
|
|
@@ -3629,7 +3597,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3629
3597
|
* Note: This endpoint is unstable, and can throw an `Error`.
|
|
3630
3598
|
* Check progress on [MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140) for more details.
|
|
3631
3599
|
*/
|
|
3632
|
-
// eslint-disable-next-line
|
|
3633
3600
|
public async _unstable_getDelayedEvents(
|
|
3634
3601
|
status?: "scheduled" | "finalised",
|
|
3635
3602
|
delayId?: string | string[],
|
|
@@ -3663,7 +3630,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3663
3630
|
* - {@link _unstable_restartScheduledDelayedEvent}
|
|
3664
3631
|
* - {@link _unstable_sendScheduledDelayedEvent}
|
|
3665
3632
|
*/
|
|
3666
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3667
3633
|
public async _unstable_updateDelayedEvent(
|
|
3668
3634
|
delayId: string,
|
|
3669
3635
|
action: UpdateDelayedEventAction,
|
|
@@ -3686,7 +3652,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3686
3652
|
*
|
|
3687
3653
|
* @throws A M_NOT_FOUND error if no matching delayed event could be found.
|
|
3688
3654
|
*/
|
|
3689
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3690
3655
|
public async _unstable_cancelScheduledDelayedEvent(
|
|
3691
3656
|
delayId: string,
|
|
3692
3657
|
requestOptions: IRequestOpts = {},
|
|
@@ -3702,7 +3667,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3702
3667
|
*
|
|
3703
3668
|
* @throws A M_NOT_FOUND error if no matching delayed event could be found.
|
|
3704
3669
|
*/
|
|
3705
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3706
3670
|
public async _unstable_restartScheduledDelayedEvent(
|
|
3707
3671
|
delayId: string,
|
|
3708
3672
|
requestOptions: IRequestOpts = {},
|
|
@@ -3721,7 +3685,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
3721
3685
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
3722
3686
|
* @see MatrixSafetyError
|
|
3723
3687
|
*/
|
|
3724
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3725
3688
|
public async _unstable_sendScheduledDelayedEvent(
|
|
3726
3689
|
delayId: string,
|
|
3727
3690
|
requestOptions: IRequestOpts = {},
|
|
@@ -4345,7 +4308,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
4345
4308
|
* @throws May throw a `MatrixSafetyError` if content is deemed unsafe.
|
|
4346
4309
|
* @see MatrixSafetyError
|
|
4347
4310
|
*/
|
|
4348
|
-
// eslint-disable-next-line camelcase
|
|
4349
4311
|
public setProfileInfo(info: "avatar_url", data: { avatar_url: string }): Promise<EmptyObject>;
|
|
4350
4312
|
public setProfileInfo(info: "displayname", data: { displayname: string }): Promise<EmptyObject>;
|
|
4351
4313
|
public setProfileInfo(info: "avatar_url" | "displayname", data: object): Promise<EmptyObject> {
|
|
@@ -6134,7 +6096,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
6134
6096
|
* @returns Rejects: with an error response.
|
|
6135
6097
|
*/
|
|
6136
6098
|
// TODO: on spec release, rename this to getMutualRooms
|
|
6137
|
-
// eslint-disable-next-line
|
|
6138
6099
|
public async _unstable_getSharedRooms(userId: string): Promise<string[]> {
|
|
6139
6100
|
// Initial variant of the MSC
|
|
6140
6101
|
const sharedRoomsSupport = await this.doesServerSupportUnstableFeature(UNSTABLE_MSC2666_SHARED_ROOMS);
|
|
@@ -6200,7 +6161,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
6200
6161
|
* Requires homeserver support for MSC4143.
|
|
6201
6162
|
* @throws A M_NOT_FOUND error if not supported by the homeserver.
|
|
6202
6163
|
*/
|
|
6203
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
6204
6164
|
public async _unstable_getRTCTransports(): Promise<Transport[]> {
|
|
6205
6165
|
// There is no /versions endpoint to check for support, so we just have to attempt a request.
|
|
6206
6166
|
return (
|
|
@@ -6848,7 +6808,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
6848
6808
|
* @returns Rejects: with an error response.
|
|
6849
6809
|
*/
|
|
6850
6810
|
public async createRoom(options: ICreateRoomOpts): Promise<{ room_id: string }> {
|
|
6851
|
-
// eslint-disable-line camelcase
|
|
6852
6811
|
// some valid options include: room_alias_name, visibility, invite
|
|
6853
6812
|
|
|
6854
6813
|
// inject the id_access_token if inviting 3rd party addresses
|
|
@@ -6980,7 +6939,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
6980
6939
|
newVersion: string,
|
|
6981
6940
|
additionalCreators?: string[],
|
|
6982
6941
|
): Promise<{ replacement_room: string }> {
|
|
6983
|
-
// eslint-disable-line camelcase
|
|
6984
6942
|
const path = utils.encodeUri("/rooms/$roomId/upgrade", { $roomId: roomId });
|
|
6985
6943
|
return this.http.authedRequest(Method.Post, path, undefined, {
|
|
6986
6944
|
new_version: newVersion,
|
|
@@ -7246,7 +7204,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
7246
7204
|
* @returns Rejects: with an error response.
|
|
7247
7205
|
*/
|
|
7248
7206
|
public getRoomIdForAlias(alias: string): Promise<{ room_id: string; servers: string[] }> {
|
|
7249
|
-
// eslint-disable-line camelcase
|
|
7250
7207
|
const path = utils.encodeUri("/directory/room/$alias", {
|
|
7251
7208
|
$alias: alias,
|
|
7252
7209
|
});
|
|
@@ -7341,11 +7298,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
7341
7298
|
* @returns Promise which resolves: TODO
|
|
7342
7299
|
* @returns Rejects: with an error response.
|
|
7343
7300
|
*/
|
|
7344
|
-
public getProfileInfo(
|
|
7345
|
-
userId: string,
|
|
7346
|
-
info?: string,
|
|
7347
|
-
// eslint-disable-next-line camelcase
|
|
7348
|
-
): Promise<{ avatar_url?: string; displayname?: string }> {
|
|
7301
|
+
public getProfileInfo(userId: string, info?: string): Promise<{ avatar_url?: string; displayname?: string }> {
|
|
7349
7302
|
const path = info
|
|
7350
7303
|
? utils.encodeUri("/profile/$userId/$info", { $userId: userId, $info: info })
|
|
7351
7304
|
: utils.encodeUri("/profile/$userId", { $userId: userId });
|
|
@@ -7444,7 +7397,17 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
7444
7397
|
)) as SyncUserProfile;
|
|
7445
7398
|
|
|
7446
7399
|
// write through to the cache
|
|
7447
|
-
await this.store.storeUserProfiles(
|
|
7400
|
+
await this.store.storeUserProfiles(
|
|
7401
|
+
new Map([
|
|
7402
|
+
[
|
|
7403
|
+
userId,
|
|
7404
|
+
{
|
|
7405
|
+
...storedProfile,
|
|
7406
|
+
...profile,
|
|
7407
|
+
},
|
|
7408
|
+
],
|
|
7409
|
+
]),
|
|
7410
|
+
);
|
|
7448
7411
|
|
|
7449
7412
|
return profile[key];
|
|
7450
7413
|
}
|
|
@@ -7605,7 +7568,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
7605
7568
|
public async unbindThreePid(
|
|
7606
7569
|
medium: string,
|
|
7607
7570
|
address: string,
|
|
7608
|
-
// eslint-disable-next-line camelcase
|
|
7609
7571
|
): Promise<{ id_server_unbind_result: IdServerUnbindResult }> {
|
|
7610
7572
|
const path = "/account/3pid/unbind";
|
|
7611
7573
|
const data = {
|
|
@@ -7624,11 +7586,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
7624
7586
|
* (generally the empty JSON object)
|
|
7625
7587
|
* @returns Rejects: with an error response.
|
|
7626
7588
|
*/
|
|
7627
|
-
public deleteThreePid(
|
|
7628
|
-
medium: string,
|
|
7629
|
-
address: string,
|
|
7630
|
-
// eslint-disable-next-line camelcase
|
|
7631
|
-
): Promise<{ id_server_unbind_result: IdServerUnbindResult }> {
|
|
7589
|
+
public deleteThreePid(medium: string, address: string): Promise<{ id_server_unbind_result: IdServerUnbindResult }> {
|
|
7632
7590
|
const path = "/account/3pid/delete";
|
|
7633
7591
|
return this.http.authedRequest(Method.Post, path, undefined, { medium, address });
|
|
7634
7592
|
}
|
|
@@ -7681,7 +7639,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|
|
7681
7639
|
* @returns Promise which resolves: to an empty object `{}`
|
|
7682
7640
|
* @returns Rejects: with an error response.
|
|
7683
7641
|
*/
|
|
7684
|
-
// eslint-disable-next-line camelcase
|
|
7685
7642
|
public setDeviceDetails(deviceId: string, body: { display_name: string }): Promise<EmptyObject> {
|
|
7686
7643
|
const path = utils.encodeUri("/devices/$device_id", {
|
|
7687
7644
|
$device_id: deviceId,
|
package/src/crypto/store/base.ts
CHANGED
|
@@ -196,7 +196,6 @@ export interface IDeviceData {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
export interface IWithheld {
|
|
199
|
-
// eslint-disable-next-line camelcase
|
|
200
199
|
room_id: string;
|
|
201
200
|
code: string;
|
|
202
201
|
reason: string;
|
|
@@ -272,7 +271,7 @@ export enum MigrationState {
|
|
|
272
271
|
export const SESSION_BATCH_SIZE = 50;
|
|
273
272
|
|
|
274
273
|
export interface InboundGroupSessionData {
|
|
275
|
-
room_id: string;
|
|
274
|
+
room_id: string;
|
|
276
275
|
/** pickled Olm.InboundGroupSession */
|
|
277
276
|
session: string;
|
|
278
277
|
keysClaimed?: Record<string, string>;
|
|
@@ -290,14 +289,11 @@ export interface ICrossSigningInfo {
|
|
|
290
289
|
crossSigningVerifiedBefore: boolean;
|
|
291
290
|
}
|
|
292
291
|
|
|
293
|
-
/* eslint-disable camelcase */
|
|
294
292
|
export interface IRoomEncryption {
|
|
295
293
|
algorithm: string;
|
|
296
294
|
rotation_period_ms?: number;
|
|
297
295
|
rotation_period_msgs?: number;
|
|
298
296
|
}
|
|
299
|
-
/* eslint-enable camelcase */
|
|
300
|
-
|
|
301
297
|
export enum TrackingStatus {
|
|
302
298
|
NotTracked,
|
|
303
299
|
PendingDownload,
|
|
@@ -348,7 +344,6 @@ export enum RoomKeyRequestState {
|
|
|
348
344
|
CancellationPendingAndWillResend,
|
|
349
345
|
}
|
|
350
346
|
|
|
351
|
-
/* eslint-disable camelcase */
|
|
352
347
|
interface IRoomKey {
|
|
353
348
|
room_id: string;
|
|
354
349
|
algorithm: string;
|
|
@@ -364,8 +359,6 @@ export interface IRoomKeyRequestBody extends IRoomKey {
|
|
|
364
359
|
sender_key: string;
|
|
365
360
|
}
|
|
366
361
|
|
|
367
|
-
/* eslint-enable camelcase */
|
|
368
|
-
|
|
369
362
|
export interface IRoomKeyRequestRecipient {
|
|
370
363
|
userId: string;
|
|
371
364
|
deviceId: string;
|
|
@@ -126,7 +126,6 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore implements Crypto
|
|
|
126
126
|
func(count);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
130
129
|
private _getEndToEndSessions(deviceKey: string): Record<string, ISessionInfo> {
|
|
131
130
|
const sessions = getJsonItem(this.store, keyEndToEndSessions(deviceKey));
|
|
132
131
|
const fixedSessions: Record<string, ISessionInfo> = {};
|
|
@@ -33,16 +33,24 @@ export interface Aes256AuthData {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Information about a server-side key backup.
|
|
36
|
+
* Information about a new server-side key backup.
|
|
37
37
|
*
|
|
38
|
-
*
|
|
38
|
+
* The type of the request body for [`POST /_matrix/client/v3/room_keys/version`](https://spec.matrix.org/v1.19/client-server-api/#post_matrixclientv3room_keysversion).
|
|
39
39
|
*/
|
|
40
|
-
export interface
|
|
40
|
+
export interface NewKeyBackupInfo {
|
|
41
41
|
algorithm: string;
|
|
42
42
|
auth_data: ISigned & (Curve25519AuthData | Aes256AuthData);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Information about an existing server-side key backup.
|
|
47
|
+
*
|
|
48
|
+
* Returned by [`GET /_matrix/client/v3/room_keys/version`](https://spec.matrix.org/v1.7/client-server-api/#get_matrixclientv3room_keysversion).
|
|
49
|
+
*/
|
|
50
|
+
export interface KeyBackupInfo extends NewKeyBackupInfo {
|
|
51
|
+
count: number;
|
|
52
|
+
etag: string;
|
|
53
|
+
version: string; // number contained within
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
/**
|
|
@@ -76,7 +84,6 @@ export interface Curve25519SessionData {
|
|
|
76
84
|
mac: string;
|
|
77
85
|
}
|
|
78
86
|
|
|
79
|
-
/* eslint-disable camelcase */
|
|
80
87
|
export interface KeyBackupSession<T = Curve25519SessionData | AESEncryptedSecretStoragePayload> {
|
|
81
88
|
first_message_index: number;
|
|
82
89
|
forwarded_count: number;
|
package/src/embedded.ts
CHANGED
|
@@ -476,7 +476,6 @@ export class RoomWidgetClient extends MatrixClient {
|
|
|
476
476
|
/**
|
|
477
477
|
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
478
478
|
*/
|
|
479
|
-
// eslint-disable-next-line
|
|
480
479
|
public async _unstable_sendDelayedStateEvent<K extends keyof StateEvents>(
|
|
481
480
|
roomId: string,
|
|
482
481
|
delayOpts: SendDelayedEventRequestOpts,
|
|
@@ -518,7 +517,6 @@ export class RoomWidgetClient extends MatrixClient {
|
|
|
518
517
|
* - {@link _unstable_restartScheduledDelayedEvent}
|
|
519
518
|
* - {@link _unstable_sendScheduledDelayedEvent}
|
|
520
519
|
*/
|
|
521
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
522
520
|
public async _unstable_updateDelayedEvent(delayId: string, action: UpdateDelayedEventAction): Promise<EmptyObject> {
|
|
523
521
|
if (!(await this.doesServerSupportUnstableFeature(UNSTABLE_MSC4140_DELAYED_EVENTS))) {
|
|
524
522
|
throw new UnsupportedDelayedEventsEndpointError(
|
|
@@ -544,7 +542,6 @@ export class RoomWidgetClient extends MatrixClient {
|
|
|
544
542
|
/**
|
|
545
543
|
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
546
544
|
*/
|
|
547
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
548
545
|
public async _unstable_cancelScheduledDelayedEvent(delayId: string): Promise<EmptyObject> {
|
|
549
546
|
if (!(await this.doesServerSupportUnstableFeature(UNSTABLE_MSC4140_DELAYED_EVENTS))) {
|
|
550
547
|
throw new UnsupportedDelayedEventsEndpointError(
|
|
@@ -560,7 +557,6 @@ export class RoomWidgetClient extends MatrixClient {
|
|
|
560
557
|
/**
|
|
561
558
|
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
562
559
|
*/
|
|
563
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
564
560
|
public async _unstable_restartScheduledDelayedEvent(delayId: string): Promise<EmptyObject> {
|
|
565
561
|
if (!(await this.doesServerSupportUnstableFeature(UNSTABLE_MSC4140_DELAYED_EVENTS))) {
|
|
566
562
|
throw new UnsupportedDelayedEventsEndpointError(
|
|
@@ -576,7 +572,6 @@ export class RoomWidgetClient extends MatrixClient {
|
|
|
576
572
|
/**
|
|
577
573
|
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
578
574
|
*/
|
|
579
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
580
575
|
public async _unstable_sendScheduledDelayedEvent(delayId: string): Promise<EmptyObject> {
|
|
581
576
|
if (!(await this.doesServerSupportUnstableFeature(UNSTABLE_MSC4140_DELAYED_EVENTS))) {
|
|
582
577
|
throw new UnsupportedDelayedEventsEndpointError(
|
package/src/feature.ts
CHANGED
|
@@ -55,9 +55,6 @@ const featureSupportResolver: Record<string, FeatureSupportCondition> = {
|
|
|
55
55
|
[Feature.RelationBasedRedactions]: {
|
|
56
56
|
unstablePrefixes: ["org.matrix.msc3912"],
|
|
57
57
|
},
|
|
58
|
-
[Feature.AccountDataDeletion]: {
|
|
59
|
-
unstablePrefixes: ["org.matrix.msc3391"],
|
|
60
|
-
},
|
|
61
58
|
[Feature.RelationsRecursion]: {
|
|
62
59
|
unstablePrefixes: ["org.matrix.msc3981"],
|
|
63
60
|
matrixVersion: "v1.10",
|
package/src/filter-component.ts
CHANGED
|
@@ -34,7 +34,6 @@ function matchesWildcard(actualValue: string, filterValue: string): boolean {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/* eslint-disable camelcase */
|
|
38
37
|
export interface IFilterComponent {
|
|
39
38
|
"types"?: string[];
|
|
40
39
|
"not_types"?: string[];
|
|
@@ -51,7 +50,6 @@ export interface IFilterComponent {
|
|
|
51
50
|
"io.element.relation_senders"?: Array<RelationType | string>;
|
|
52
51
|
"io.element.relation_types"?: string[];
|
|
53
52
|
}
|
|
54
|
-
/* eslint-enable camelcase */
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
55
|
* FilterComponent is a section of a Filter definition which defines the
|
|
@@ -144,6 +142,7 @@ export class FilterComponent {
|
|
|
144
142
|
},
|
|
145
143
|
} as const;
|
|
146
144
|
|
|
145
|
+
// oxlint-disable-next-line guard-for-in
|
|
147
146
|
for (const name in literalKeys) {
|
|
148
147
|
const matchFunc = literalKeys[<keyof typeof literalKeys>name];
|
|
149
148
|
const notName = "not_" + name;
|
package/src/filter.ts
CHANGED
|
@@ -36,7 +36,6 @@ function setProp(obj: Record<string, any>, keyNesting: string, val: any): void {
|
|
|
36
36
|
currentObj[nestedKeys[nestedKeys.length - 1]] = val;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
/* eslint-disable camelcase */
|
|
40
39
|
export interface IFilterDefinition {
|
|
41
40
|
"event_fields"?: string[];
|
|
42
41
|
"event_format"?: "client" | "federation";
|
|
@@ -80,8 +79,6 @@ interface ProfileFieldsFilter {
|
|
|
80
79
|
ids: string[];
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
/* eslint-enable camelcase */
|
|
84
|
-
|
|
85
82
|
export class Filter {
|
|
86
83
|
public static LAZY_LOADING_MESSAGES_FILTER = {
|
|
87
84
|
lazy_load_members: true,
|
package/src/http-api/refresh.ts
CHANGED
|
@@ -97,7 +97,6 @@ export class TokenRefresher {
|
|
|
97
97
|
return this._handleUnknownToken(snapshot, attempt);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
101
100
|
private async _handleUnknownToken(): Promise<TokenRefreshOutcome>;
|
|
102
101
|
private async _handleUnknownToken(snapshot: Snapshot, attempt: number): Promise<TokenRefreshOutcome>;
|
|
103
102
|
private async _handleUnknownToken(snapshot?: Snapshot, attempt?: number): Promise<TokenRefreshOutcome> {
|
package/src/interactive-auth.ts
CHANGED
|
@@ -145,7 +145,6 @@ export class NoAuthFlowFoundError extends Error {
|
|
|
145
145
|
|
|
146
146
|
public constructor(
|
|
147
147
|
m: string,
|
|
148
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention, camelcase
|
|
149
148
|
public readonly required_stages: string[],
|
|
150
149
|
public readonly flows: UIAFlow[],
|
|
151
150
|
) {
|
|
@@ -420,12 +419,13 @@ export class InteractiveAuth<T> {
|
|
|
420
419
|
// if we're currently trying a request, wait for it to finish
|
|
421
420
|
// as otherwise we can get multiple 200 responses which can mean
|
|
422
421
|
// things like multiple logins for register requests.
|
|
423
|
-
// (but discard any exceptions as we only care when its done,
|
|
424
|
-
// not whether it worked or not)
|
|
425
422
|
while (this.submitPromise) {
|
|
426
423
|
try {
|
|
427
424
|
await this.submitPromise;
|
|
428
|
-
} catch {
|
|
425
|
+
} catch {
|
|
426
|
+
// discard any exceptions as we only care when its done,
|
|
427
|
+
// not whether it worked or not
|
|
428
|
+
}
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
// use the sessionid from the last request, if one is present.
|
package/src/logger.ts
CHANGED
|
@@ -98,11 +98,9 @@ const DEFAULT_NAMESPACE = "matrix";
|
|
|
98
98
|
// when logging so we always get the current value of console methods.
|
|
99
99
|
loglevel.methodFactory = function (methodName, logLevel, loggerName) {
|
|
100
100
|
return function (this: PrefixedLogger, ...args): void {
|
|
101
|
-
/* eslint-disable @typescript-eslint/no-invalid-this */
|
|
102
101
|
if (this.prefix) {
|
|
103
102
|
args.unshift(this.prefix);
|
|
104
103
|
}
|
|
105
|
-
/* eslint-enable @typescript-eslint/no-invalid-this */
|
|
106
104
|
const supportedByConsole =
|
|
107
105
|
methodName === "error" ||
|
|
108
106
|
methodName === "warn" ||
|
|
@@ -385,7 +385,7 @@ export class CallMembership {
|
|
|
385
385
|
* ## RTC Membership
|
|
386
386
|
* Gets the primary transport to use for this RTC membership (m.rtc.member).
|
|
387
387
|
* This will return the primary transport that is used by this call membership to publish their media.
|
|
388
|
-
* Directly relates to the `
|
|
388
|
+
* Directly relates to the `transports.published` field.
|
|
389
389
|
*
|
|
390
390
|
* ## Legacy session membership
|
|
391
391
|
* In case of a legacy session membership (m.call.member) this will return the selected transport where
|
|
@@ -393,7 +393,7 @@ export class CallMembership {
|
|
|
393
393
|
* If the `focus_selection` is `oldest_membership` this will return the transport of the oldest membership
|
|
394
394
|
* in the room (based on the `created_ts` field of the session membership).
|
|
395
395
|
* If the `focus_selection` is `multi_sfu` it will return the first transport of the `foci_preferred` list.
|
|
396
|
-
* (`multi_sfu` is equivalent to how `m.rtc.member` `
|
|
396
|
+
* (`multi_sfu` is equivalent to how `m.rtc.member` `transports.published` work).
|
|
397
397
|
* @param oldestMembership For backwards compatibility with session membership (legacy). Unused in case of RTC membership.
|
|
398
398
|
* Always required to make the consumer not care if it deals with RTC or session memberships.
|
|
399
399
|
* @returns The transport this membership uses to publish media or undefined if no transport is available.
|
|
@@ -402,7 +402,7 @@ export class CallMembership {
|
|
|
402
402
|
const { kind, data } = this.membershipData;
|
|
403
403
|
switch (kind) {
|
|
404
404
|
case MembershipKind.RTC:
|
|
405
|
-
return data.
|
|
405
|
+
return data.transports.published[0];
|
|
406
406
|
case MembershipKind.Session:
|
|
407
407
|
switch (data.focus_active.focus_selection) {
|
|
408
408
|
case "oldest_membership":
|
|
@@ -422,14 +422,14 @@ export class CallMembership {
|
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
/**
|
|
425
|
-
* The value of the `
|
|
425
|
+
* The value of the `transports.published` field for RTC memberships (m.rtc.member).
|
|
426
426
|
* Or the value of the `foci_preferred` field for legacy session memberships (m.call.member).
|
|
427
427
|
*/
|
|
428
428
|
public get transports(): Transport[] {
|
|
429
429
|
const { kind, data } = this.membershipData;
|
|
430
430
|
switch (kind) {
|
|
431
431
|
case MembershipKind.RTC:
|
|
432
|
-
return data.
|
|
432
|
+
return data.transports.published;
|
|
433
433
|
case MembershipKind.Session:
|
|
434
434
|
default:
|
|
435
435
|
return data.foci_preferred;
|