matrix-js-sdk 37.2.0 → 37.3.0-rc.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.
Files changed (83) hide show
  1. package/git-revision.txt +1 -1
  2. package/lib/client.d.ts +8 -2
  3. package/lib/client.d.ts.map +1 -1
  4. package/lib/client.js +11 -3
  5. package/lib/client.js.map +1 -1
  6. package/lib/common-crypto/CryptoBackend.d.ts +8 -0
  7. package/lib/common-crypto/CryptoBackend.d.ts.map +1 -1
  8. package/lib/common-crypto/CryptoBackend.js.map +1 -1
  9. package/lib/http-api/errors.d.ts +8 -0
  10. package/lib/http-api/errors.d.ts.map +1 -1
  11. package/lib/http-api/errors.js +14 -0
  12. package/lib/http-api/errors.js.map +1 -1
  13. package/lib/http-api/fetch.d.ts.map +1 -1
  14. package/lib/http-api/fetch.js +3 -3
  15. package/lib/http-api/fetch.js.map +1 -1
  16. package/lib/matrixrtc/LegacyMembershipManager.d.ts +9 -1
  17. package/lib/matrixrtc/LegacyMembershipManager.d.ts.map +1 -1
  18. package/lib/matrixrtc/LegacyMembershipManager.js +20 -0
  19. package/lib/matrixrtc/LegacyMembershipManager.js.map +1 -1
  20. package/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
  21. package/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
  22. package/lib/matrixrtc/NewMembershipManager.d.ts +7 -58
  23. package/lib/matrixrtc/NewMembershipManager.d.ts.map +1 -1
  24. package/lib/matrixrtc/NewMembershipManager.js +130 -137
  25. package/lib/matrixrtc/NewMembershipManager.js.map +1 -1
  26. package/lib/matrixrtc/NewMembershipManagerActionScheduler.js +3 -3
  27. package/lib/matrixrtc/NewMembershipManagerActionScheduler.js.map +1 -1
  28. package/lib/matrixrtc/index.d.ts +1 -0
  29. package/lib/matrixrtc/index.d.ts.map +1 -1
  30. package/lib/matrixrtc/index.js +1 -0
  31. package/lib/matrixrtc/index.js.map +1 -1
  32. package/lib/matrixrtc/types.d.ts +77 -1
  33. package/lib/matrixrtc/types.d.ts.map +1 -1
  34. package/lib/matrixrtc/types.js +40 -1
  35. package/lib/matrixrtc/types.js.map +1 -1
  36. package/lib/models/room-summary.d.ts +30 -0
  37. package/lib/models/room-summary.d.ts.map +1 -1
  38. package/lib/models/room-summary.js +11 -0
  39. package/lib/models/room-summary.js.map +1 -1
  40. package/lib/models/room.d.ts +37 -1
  41. package/lib/models/room.d.ts.map +1 -1
  42. package/lib/models/room.js +133 -28
  43. package/lib/models/room.js.map +1 -1
  44. package/lib/oidc/tokenRefresher.d.ts.map +1 -1
  45. package/lib/oidc/tokenRefresher.js +8 -1
  46. package/lib/oidc/tokenRefresher.js.map +1 -1
  47. package/lib/pushprocessor.d.ts +10 -1
  48. package/lib/pushprocessor.d.ts.map +1 -1
  49. package/lib/pushprocessor.js +24 -9
  50. package/lib/pushprocessor.js.map +1 -1
  51. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +1 -1
  52. package/lib/rust-crypto/OutgoingRequestProcessor.js +6 -1
  53. package/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
  54. package/lib/rust-crypto/rust-crypto.d.ts +4 -1
  55. package/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
  56. package/lib/rust-crypto/rust-crypto.js +55 -46
  57. package/lib/rust-crypto/rust-crypto.js.map +1 -1
  58. package/lib/sliding-sync-sdk.d.ts.map +1 -1
  59. package/lib/sliding-sync-sdk.js +86 -75
  60. package/lib/sliding-sync-sdk.js.map +1 -1
  61. package/lib/sliding-sync.d.ts +23 -60
  62. package/lib/sliding-sync.d.ts.map +1 -1
  63. package/lib/sliding-sync.js +62 -321
  64. package/lib/sliding-sync.js.map +1 -1
  65. package/package.json +6 -6
  66. package/src/client.ts +12 -5
  67. package/src/common-crypto/CryptoBackend.ts +9 -0
  68. package/src/http-api/errors.ts +14 -0
  69. package/src/http-api/fetch.ts +3 -4
  70. package/src/matrixrtc/LegacyMembershipManager.ts +27 -1
  71. package/src/matrixrtc/MatrixRTCSession.ts +2 -1
  72. package/src/matrixrtc/NewMembershipManager.ts +120 -165
  73. package/src/matrixrtc/NewMembershipManagerActionScheduler.ts +3 -3
  74. package/src/matrixrtc/index.ts +1 -0
  75. package/src/matrixrtc/types.ts +84 -1
  76. package/src/models/room-summary.ts +31 -0
  77. package/src/models/room.ts +133 -23
  78. package/src/oidc/tokenRefresher.ts +8 -2
  79. package/src/pushprocessor.ts +25 -16
  80. package/src/rust-crypto/OutgoingRequestProcessor.ts +6 -0
  81. package/src/rust-crypto/rust-crypto.ts +7 -1
  82. package/src/sliding-sync-sdk.ts +28 -28
  83. package/src/sliding-sync.ts +38 -329
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/matrixrtc/types.ts"],"sourcesContent":["/*\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport { type IMentions } from \"../matrix.ts\";\nexport interface EncryptionKeyEntry {\n index: number;\n key: string;\n}\n\nexport interface EncryptionKeysEventContent {\n keys: EncryptionKeyEntry[];\n device_id: string;\n call_id: string;\n sent_ts?: number;\n}\n\nexport type CallNotifyType = \"ring\" | \"notify\";\n\nexport interface ICallNotifyContent {\n \"application\": string;\n \"m.mentions\": IMentions;\n \"notify_type\": CallNotifyType;\n \"call_id\": string;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["Status","MembershipManagerEvent"],"sources":["../../src/matrixrtc/types.ts"],"sourcesContent":["/*\nCopyright 2023 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport type { IMentions } from \"../matrix.ts\";\nimport type { CallMembership } from \"./CallMembership.ts\";\nimport type { Focus } from \"./focus.ts\";\n\nexport interface EncryptionKeyEntry {\n index: number;\n key: string;\n}\n\nexport interface EncryptionKeysEventContent {\n keys: EncryptionKeyEntry[];\n device_id: string;\n call_id: string;\n sent_ts?: number;\n}\n\nexport type CallNotifyType = \"ring\" | \"notify\";\n\nexport interface ICallNotifyContent {\n \"application\": string;\n \"m.mentions\": IMentions;\n \"notify_type\": CallNotifyType;\n \"call_id\": string;\n}\n\nexport enum Status {\n Disconnected = \"Disconnected\",\n Connecting = \"Connecting\",\n ConnectingFailed = \"ConnectingFailed\",\n Connected = \"Connected\",\n Reconnecting = \"Reconnecting\",\n Disconnecting = \"Disconnecting\",\n Stuck = \"Stuck\",\n Unknown = \"Unknown\",\n}\n\nexport enum MembershipManagerEvent {\n StatusChanged = \"StatusChanged\",\n}\n\nexport type MembershipManagerEventHandlerMap = {\n [MembershipManagerEvent.StatusChanged]: (prefStatus: Status, newStatus: Status) => void;\n};\n\n/**\n * This interface defines what a MembershipManager uses and exposes.\n * This interface is what we use to write tests and allows changing the actual implementation\n * without breaking tests because of some internal method renaming.\n *\n * @internal\n */\nexport interface IMembershipManager {\n /**\n * If we are trying to join, or have successfully joined the session.\n * It does not reflect if the room state is already configured to represent us being joined.\n * It only means that the Manager should be trying to connect or to disconnect running.\n * The Manager is still running right after isJoined becomes false to send the disconnect events.\n * @returns true if we intend to be participating in the MatrixRTC session\n * @deprecated This name is confusing and replaced by `isActivated()`. (Returns the same as `isActivated()`)\n */\n isJoined(): boolean;\n /**\n * If the manager is activated. This means it tries to do its job to join the call, resend state events...\n * It does not imply that the room state is already configured to represent being joined.\n * It means that the Manager tries to connect or is connected. (\"the manager is still active\")\n * Once `leave()` is called the manager is not activated anymore but still running until `leave()` resolves.\n * @returns `true` if we intend to be participating in the MatrixRTC session\n */\n isActivated(): boolean;\n /**\n * Get the actual connection status of the manager.\n */\n get status(): Status;\n /**\n * The current status while the manager is activated\n */\n /**\n * Start sending all necessary events to make this user participate in the RTC session.\n * @param fociPreferred the list of preferred foci to use in the joined RTC membership event.\n * @param fociActive the active focus to use in the joined RTC membership event.\n * @throws can throw if it exceeds a configured maximum retry.\n */\n join(fociPreferred: Focus[], fociActive?: Focus, onError?: (error: unknown) => void): void;\n /**\n * Send all necessary events to make this user leave the RTC session.\n * @param timeout the maximum duration in ms until the promise is forced to resolve.\n * @returns It resolves with true in case the leave was sent successfully.\n * It resolves with false in case we hit the timeout before sending successfully.\n */\n leave(timeout?: number): Promise<boolean>;\n /**\n * Call this if the MatrixRTC session members have changed.\n */\n onRTCSessionMemberUpdate(memberships: CallMembership[]): Promise<void>;\n /**\n * The used active focus in the currently joined session.\n * @returns the used active focus in the currently joined session or undefined if not joined.\n */\n getActiveFocus(): Focus | undefined;\n\n // TypedEventEmitter methods:\n on(event: MembershipManagerEvent.StatusChanged, listener: (oldStatus: Status, newStatus: Status) => void): this;\n off(event: MembershipManagerEvent.StatusChanged, listener: (oldStatus: Status, newStatus: Status) => void): this;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAWlB,WAAYC,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;;AAQlC;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,6 +1,36 @@
1
+ /**
2
+ * A stripped m.room.member event which contains the key renderable fields from the event,
3
+ * sent only in simplified sliding sync (not `/v3/sync`).
4
+ * This is very similar to MSC4186Hero from sliding-sync.ts but an internal format with
5
+ * camelCase rather than underscores.
6
+ */
7
+ export type Hero = {
8
+ userId: string;
9
+ displayName?: string;
10
+ avatarUrl?: string;
11
+ /**
12
+ * If true, the hero is from an MSC4186 summary, in which case `displayName` and `avatarUrl` will
13
+ * have been set by the server if available. If false, the `Hero` has been constructed from a `/v3/sync` response,
14
+ * so these fields will always be undefined.
15
+ */
16
+ fromMSC4186: boolean;
17
+ };
18
+ /**
19
+ * High level summary information for a room, as returned by `/v3/sync`.
20
+ */
1
21
  export interface IRoomSummary {
22
+ /**
23
+ * The room heroes: a selected set of members that can be used when summarising or
24
+ * generating a name for a room. List of user IDs.
25
+ */
2
26
  "m.heroes": string[];
27
+ /**
28
+ * The number of joined members in the room.
29
+ */
3
30
  "m.joined_member_count"?: number;
31
+ /**
32
+ * The number of invited members in the room.
33
+ */
4
34
  "m.invited_member_count"?: number;
5
35
  }
6
36
  interface IInfo {
@@ -1 +1 @@
1
- {"version":3,"file":"room-summary.d.ts","sourceRoot":"","sources":["../../src/models/room-summary.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,UAAU,KAAK;IACX,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,WAAW;aAEA,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM,EAC9B,IAAI,CAAC,EAAE,KAAK;CAEnB"}
1
+ {"version":3,"file":"room-summary.d.ts","sourceRoot":"","sources":["../../src/models/room-summary.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,MAAM,MAAM,IAAI,GAAG;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,UAAU,KAAK;IACX,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,WAAW;aAEA,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM,EAC9B,IAAI,CAAC,EAAE,KAAK;CAEnB"}
@@ -14,6 +14,17 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */
16
16
 
17
+ /**
18
+ * A stripped m.room.member event which contains the key renderable fields from the event,
19
+ * sent only in simplified sliding sync (not `/v3/sync`).
20
+ * This is very similar to MSC4186Hero from sliding-sync.ts but an internal format with
21
+ * camelCase rather than underscores.
22
+ */
23
+
24
+ /**
25
+ * High level summary information for a room, as returned by `/v3/sync`.
26
+ */
27
+
17
28
  /**
18
29
  * Construct a new Room Summary. A summary can be used for display on a recent
19
30
  * list, without having to load the entire room list into memory.
@@ -1 +1 @@
1
- {"version":3,"file":"room-summary.js","names":["RoomSummary","constructor","roomId","info"],"sources":["../../src/models/room-summary.ts"],"sourcesContent":["/*\nCopyright 2015 - 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nexport interface IRoomSummary {\n \"m.heroes\": string[];\n \"m.joined_member_count\"?: number;\n \"m.invited_member_count\"?: number;\n}\n\ninterface IInfo {\n /** The title of the room (e.g. `m.room.name`) */\n title: string;\n /** The description of the room (e.g. `m.room.topic`) */\n desc?: string;\n /** The number of joined users. */\n numMembers?: number;\n /** The list of aliases for this room. */\n aliases?: string[];\n /** The timestamp for this room. */\n timestamp?: number;\n}\n\n/**\n * Construct a new Room Summary. A summary can be used for display on a recent\n * list, without having to load the entire room list into memory.\n * @param roomId - Required. The ID of this room.\n * @param info - Optional. The summary info. Additional keys are supported.\n */\nexport class RoomSummary {\n public constructor(\n public readonly roomId: string,\n info?: IInfo,\n ) {}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,CAAC;EACdC,WAAWA,CACEC,MAAc,EAC9BC,IAAY,EACd;IAAA,KAFkBD,MAAc,GAAdA,MAAc;EAE/B;AACP","ignoreList":[]}
1
+ {"version":3,"file":"room-summary.js","names":["RoomSummary","constructor","roomId","info"],"sources":["../../src/models/room-summary.ts"],"sourcesContent":["/*\nCopyright 2015 - 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/**\n * A stripped m.room.member event which contains the key renderable fields from the event,\n * sent only in simplified sliding sync (not `/v3/sync`).\n * This is very similar to MSC4186Hero from sliding-sync.ts but an internal format with\n * camelCase rather than underscores.\n */\nexport type Hero = {\n userId: string;\n displayName?: string;\n avatarUrl?: string;\n /**\n * If true, the hero is from an MSC4186 summary, in which case `displayName` and `avatarUrl` will\n * have been set by the server if available. If false, the `Hero` has been constructed from a `/v3/sync` response,\n * so these fields will always be undefined.\n */\n fromMSC4186: boolean;\n};\n\n/**\n * High level summary information for a room, as returned by `/v3/sync`.\n */\nexport interface IRoomSummary {\n /**\n * The room heroes: a selected set of members that can be used when summarising or\n * generating a name for a room. List of user IDs.\n */\n \"m.heroes\": string[];\n /**\n * The number of joined members in the room.\n */\n \"m.joined_member_count\"?: number;\n /**\n * The number of invited members in the room.\n */\n \"m.invited_member_count\"?: number;\n}\n\ninterface IInfo {\n /** The title of the room (e.g. `m.room.name`) */\n title: string;\n /** The description of the room (e.g. `m.room.topic`) */\n desc?: string;\n /** The number of joined users. */\n numMembers?: number;\n /** The list of aliases for this room. */\n aliases?: string[];\n /** The timestamp for this room. */\n timestamp?: number;\n}\n\n/**\n * Construct a new Room Summary. A summary can be used for display on a recent\n * list, without having to load the entire room list into memory.\n * @param roomId - Required. The ID of this room.\n * @param info - Optional. The summary info. Additional keys are supported.\n */\nexport class RoomSummary {\n public constructor(\n public readonly roomId: string,\n info?: IInfo,\n ) {}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;;AA8BA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,CAAC;EACdC,WAAWA,CACEC,MAAc,EAC9BC,IAAY,EACd;IAAA,KAFkBD,MAAc,GAAdA,MAAc;EAE/B;AACP","ignoreList":[]}
@@ -17,6 +17,7 @@ import { RelationsContainer } from "./relations-container.ts";
17
17
  import { ReadReceipt } from "./read-receipt.ts";
18
18
  import { Poll, PollEvent } from "./poll.ts";
19
19
  import { type Membership } from "../@types/membership.ts";
20
+ import { type MSC4186Hero } from "../sliding-sync.ts";
20
21
  export declare const KNOWN_SAFE_ROOM_VERSION = "10";
21
22
  interface IOpts {
22
23
  /**
@@ -210,6 +211,7 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
210
211
  readonly reEmitter: TypedReEmitter<RoomEmittedEvents, RoomEventHandlerMap>;
211
212
  private txnToEvent;
212
213
  private notificationCounts;
214
+ private bumpStamp;
213
215
  private readonly threadNotifications;
214
216
  readonly cachedThreadReadReceipts: Map<string, CachedReceiptStructure[]>;
215
217
  private oldestThreadedReceiptTs;
@@ -231,7 +233,16 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
231
233
  private readonly pendingEventList?;
232
234
  private blacklistUnverifiedDevices?;
233
235
  private selfMembership?;
234
- private summaryHeroes;
236
+ /**
237
+ * A `Hero` is a stripped `m.room.member` event which contains the important renderable fields from the event.
238
+ *
239
+ * It is used in MSC4186 (Simplified Sliding Sync) as a replacement for the old `summary` field.
240
+ *
241
+ * When we are doing old-style (`/v3/sync`) sync, we simulate the SSS behaviour by constructing
242
+ * a `Hero` object based on the user id we get from the summary. Obviously, in that case,
243
+ * the `Hero` will lack a `displayName` or `avatarUrl`.
244
+ */
245
+ private heroes;
235
246
  private getTypeWarning;
236
247
  private getVersionWarning;
237
248
  private membersPromise?;
@@ -631,6 +642,18 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
631
642
  * @param exceptThreadIds - The thread IDs to exclude from the reset.
632
643
  */
633
644
  resetThreadUnreadNotificationCountFromSync(exceptThreadIds?: string[]): void;
645
+ /**
646
+ * Set the bump stamp for this room. This can be used for sorting rooms when the timeline
647
+ * entries are unknown. Used in MSC4186: Simplified Sliding Sync.
648
+ * @param bumpStamp The bump_stamp value from the server
649
+ */
650
+ setBumpStamp(bumpStamp: number): void;
651
+ /**
652
+ * Get the bump stamp for this room. This can be used for sorting rooms when the timeline
653
+ * entries are unknown. Used in MSC4186: Simplified Sliding Sync.
654
+ * @returns The bump stamp for the room, if it exists.
655
+ */
656
+ getBumpStamp(): number | undefined;
634
657
  /**
635
658
  * Set one of the notification counts for this room
636
659
  * @param type - The type of notification count to set.
@@ -638,7 +661,20 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
638
661
  */
639
662
  setUnreadNotificationCount(type: NotificationCountType, count: number): void;
640
663
  setUnread(type: NotificationCountType, count: number): void;
664
+ /**
665
+ * Takes a legacy room summary (/v3/sync as opposed to MSC4186) and updates the room with it.
666
+ *
667
+ * @param summary - The room summary to update the room with
668
+ */
641
669
  setSummary(summary: IRoomSummary): void;
670
+ /**
671
+ * Takes information from the MSC4186 room summary and updates the room with it.
672
+ *
673
+ * @param heroes - The room's hero members
674
+ * @param joinedCount - The number of joined members
675
+ * @param invitedCount - The number of invited members
676
+ */
677
+ setMSC4186SummaryData(heroes: MSC4186Hero[] | undefined, joinedCount: number | undefined, invitedCount: number | undefined): void;
642
678
  /**
643
679
  * Whether to send encrypted messages to devices within this room.
644
680
  * @param value - true to blacklist unverified devices, null
@@ -1 +1 @@
1
- {"version":3,"file":"room.d.ts","sourceRoot":"","sources":["../../src/models/room.ts"],"names":[],"mappings":"AAkBA,OAAO,EACH,gBAAgB,EAEhB,KAAK,oBAAoB,E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G;IACI,0BAA0B,IAAI,MAAM;IAI3C;;;;;;;;OAQG;IACI,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAIjE;;;;;;OAMG;IACI,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAIvE;;;;;;;;;;OAUG;IACI,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAY/C;;;;;;;;;;;;;;;;;;;OAmBG;IACI,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIrF;;;;;OAKG;IACI,uBAAuB,IAAI,OAAO;CAK5C;AAYD,oBAAY,YAAY;IACpB,SAAS,IAAA;IACT,SAAS,IAAA;IACT,MAAM,IAAA;CACT;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,mBAAmB,CAAC"}
@@ -45,7 +45,6 @@ import { compareEventOrdering } from "./compare-event-ordering.js";
45
45
  import * as utils from "../utils.js";
46
46
  import { KnownMembership } from "../@types/membership.js";
47
47
  import { RoomVersionStability } from "../serverCapabilities.js";
48
-
49
48
  // These constants are used as sane defaults when the homeserver doesn't support
50
49
  // the m.room_versions capability. In practice, KNOWN_SAFE_ROOM_VERSION should be
51
50
  // the same as the common default room version whereas SAFE_ROOM_VERSIONS are the
@@ -132,6 +131,7 @@ export class Room extends ReadReceipt {
132
131
  _defineProperty(this, "txnToEvent", new Map());
133
132
  // Pending in-flight requests { string: MatrixEvent }
134
133
  _defineProperty(this, "notificationCounts", {});
134
+ _defineProperty(this, "bumpStamp", undefined);
135
135
  _defineProperty(this, "threadNotifications", new Map());
136
136
  _defineProperty(this, "cachedThreadReadReceipts", new Map());
137
137
  // Useful to know at what point the current user has started using threads in this room
@@ -157,7 +157,16 @@ export class Room extends ReadReceipt {
157
157
  // read by megolm via getter; boolean value - null indicates "use global value"
158
158
  _defineProperty(this, "blacklistUnverifiedDevices", void 0);
159
159
  _defineProperty(this, "selfMembership", void 0);
160
- _defineProperty(this, "summaryHeroes", null);
160
+ /**
161
+ * A `Hero` is a stripped `m.room.member` event which contains the important renderable fields from the event.
162
+ *
163
+ * It is used in MSC4186 (Simplified Sliding Sync) as a replacement for the old `summary` field.
164
+ *
165
+ * When we are doing old-style (`/v3/sync`) sync, we simulate the SSS behaviour by constructing
166
+ * a `Hero` object based on the user id we get from the summary. Obviously, in that case,
167
+ * the `Hero` will lack a `displayName` or `avatarUrl`.
168
+ */
169
+ _defineProperty(this, "heroes", null);
161
170
  // flags to stop logspam about missing m.room.create events
162
171
  _defineProperty(this, "getTypeWarning", false);
163
172
  _defineProperty(this, "getVersionWarning", false);
@@ -686,8 +695,8 @@ export class Room extends ReadReceipt {
686
695
  // fall back to summary information
687
696
  var memberCount = this.getInvitedAndJoinedMemberCount();
688
697
  if (memberCount === 2) {
689
- var _this$summaryHeroes;
690
- return (_this$summaryHeroes = this.summaryHeroes) === null || _this$summaryHeroes === void 0 ? void 0 : _this$summaryHeroes[0];
698
+ var _this$heroes;
699
+ return (_this$heroes = this.heroes) === null || _this$heroes === void 0 || (_this$heroes = _this$heroes[0]) === null || _this$heroes === void 0 ? void 0 : _this$heroes.userId;
691
700
  }
692
701
  }
693
702
  }
@@ -705,8 +714,8 @@ export class Room extends ReadReceipt {
705
714
  }
706
715
  }
707
716
  // Remember, we're assuming this room is a DM, so returning the first member we find should be fine
708
- if (Array.isArray(this.summaryHeroes) && this.summaryHeroes.length) {
709
- return this.summaryHeroes[0];
717
+ if (Array.isArray(this.heroes) && this.heroes.length) {
718
+ return this.heroes[0].userId;
710
719
  }
711
720
  var members = this.currentState.getMembers();
712
721
  var anyMember = members.find(m => m.userId !== this.myUserId);
@@ -735,7 +744,7 @@ export class Room extends ReadReceipt {
735
744
  return [];
736
745
  }
737
746
  getAvatarFallbackMember() {
738
- var _this$summaryHeroes2;
747
+ var _this$heroes2;
739
748
  var functionalMembers = this.getFunctionalMembers();
740
749
 
741
750
  // Only generate a fallback avatar if the conversation is with a single specific other user (a "DM").
@@ -748,11 +757,42 @@ export class Room extends ReadReceipt {
748
757
  if (nonFunctionalMemberCount > 2) return;
749
758
 
750
759
  // Prefer the list of heroes, if present. It should only include the single other user in the DM.
751
- var nonFunctionalHeroes = (_this$summaryHeroes2 = this.summaryHeroes) === null || _this$summaryHeroes2 === void 0 ? void 0 : _this$summaryHeroes2.filter(h => !functionalMembers.includes(h));
760
+ var nonFunctionalHeroes = (_this$heroes2 = this.heroes) === null || _this$heroes2 === void 0 ? void 0 : _this$heroes2.filter(h => !functionalMembers.includes(h.userId));
752
761
  var hasHeroes = Array.isArray(nonFunctionalHeroes) && nonFunctionalHeroes.length;
753
762
  if (hasHeroes) {
754
- var availableMember = nonFunctionalHeroes.map(userId => {
755
- return this.getMember(userId);
763
+ // use first hero that has a display name or avatar url, or whose user ID
764
+ // can be looked up as a member of the room
765
+ for (var hero of nonFunctionalHeroes) {
766
+ // If the hero was from a legacy sync (`/v3/sync`), we will need to look the user ID up in the room
767
+ // the display name and avatar URL will not be set.
768
+ if (!hero.fromMSC4186) {
769
+ // attempt to look up renderable fields from the m.room.member event if it exists
770
+ var member = this.getMember(hero.userId);
771
+ if (member) {
772
+ return member;
773
+ }
774
+ } else {
775
+ // use the Hero supplied values for the room member.
776
+ // TODO: It's unfortunate that this function, which clearly only cares about the
777
+ // avatar url, returns the entire RoomMember event. We need to fake an event
778
+ // to meet this API shape.
779
+ var heroMember = new RoomMember(this.roomId, hero.userId);
780
+ // set the display name and avatar url
781
+ heroMember.setMembershipEvent(new MatrixEvent({
782
+ // ensure it's unique even if we hit the same millisecond
783
+ event_id: "$" + this.roomId + hero.userId + new Date().getTime(),
784
+ type: EventType.RoomMember,
785
+ state_key: hero.userId,
786
+ content: {
787
+ displayname: hero.displayName,
788
+ avatar_url: hero.avatarUrl
789
+ }
790
+ }));
791
+ return heroMember;
792
+ }
793
+ }
794
+ var availableMember = nonFunctionalHeroes.map(hero => {
795
+ return this.getMember(hero.userId);
756
796
  }).find(member => !!member);
757
797
  if (availableMember) {
758
798
  return availableMember;
@@ -775,13 +815,13 @@ export class Room extends ReadReceipt {
775
815
  // If all else failed, but the homeserver gave us heroes that previously could not be found in the room members,
776
816
  // trust and try falling back to a hero, creating a one-off member for it
777
817
  if (hasHeroes) {
778
- var availableUser = nonFunctionalHeroes.map(userId => {
779
- return this.client.getUser(userId);
818
+ var availableUser = nonFunctionalHeroes.map(hero => {
819
+ return this.client.getUser(hero.userId);
780
820
  }).find(user => !!user);
781
821
  if (availableUser) {
782
- var member = new RoomMember(this.roomId, availableUser.userId);
783
- member.user = availableUser;
784
- return member;
822
+ var _member = new RoomMember(this.roomId, availableUser.userId);
823
+ _member.user = availableUser;
824
+ return _member;
785
825
  }
786
826
  }
787
827
  }
@@ -1349,6 +1389,24 @@ export class Room extends ReadReceipt {
1349
1389
  this.emit(RoomEvent.UnreadNotifications);
1350
1390
  }
1351
1391
 
1392
+ /**
1393
+ * Set the bump stamp for this room. This can be used for sorting rooms when the timeline
1394
+ * entries are unknown. Used in MSC4186: Simplified Sliding Sync.
1395
+ * @param bumpStamp The bump_stamp value from the server
1396
+ */
1397
+ setBumpStamp(bumpStamp) {
1398
+ this.bumpStamp = bumpStamp;
1399
+ }
1400
+
1401
+ /**
1402
+ * Get the bump stamp for this room. This can be used for sorting rooms when the timeline
1403
+ * entries are unknown. Used in MSC4186: Simplified Sliding Sync.
1404
+ * @returns The bump stamp for the room, if it exists.
1405
+ */
1406
+ getBumpStamp() {
1407
+ return this.bumpStamp;
1408
+ }
1409
+
1352
1410
  /**
1353
1411
  * Set one of the notification counts for this room
1354
1412
  * @param type - The type of notification count to set.
@@ -1361,8 +1419,18 @@ export class Room extends ReadReceipt {
1361
1419
  setUnread(type, count) {
1362
1420
  return this.setUnreadNotificationCount(type, count);
1363
1421
  }
1422
+
1423
+ /**
1424
+ * Takes a legacy room summary (/v3/sync as opposed to MSC4186) and updates the room with it.
1425
+ *
1426
+ * @param summary - The room summary to update the room with
1427
+ */
1364
1428
  setSummary(summary) {
1365
- var heroes = summary["m.heroes"];
1429
+ var _summary$mHeroes;
1430
+ var heroes = (_summary$mHeroes = summary["m.heroes"]) === null || _summary$mHeroes === void 0 ? void 0 : _summary$mHeroes.map(h => ({
1431
+ userId: h,
1432
+ fromMSC4186: false
1433
+ }));
1366
1434
  var joinedCount = summary["m.joined_member_count"];
1367
1435
  var invitedCount = summary["m.invited_member_count"];
1368
1436
  if (Number.isInteger(joinedCount)) {
@@ -1372,16 +1440,46 @@ export class Room extends ReadReceipt {
1372
1440
  this.currentState.setInvitedMemberCount(invitedCount);
1373
1441
  }
1374
1442
  if (Array.isArray(heroes)) {
1375
- // be cautious about trusting server values,
1376
- // and make sure heroes doesn't contain our own id
1377
- // just to be sure
1378
- this.summaryHeroes = heroes.filter(userId => {
1379
- return userId !== this.myUserId;
1443
+ // filter out ourselves just in case
1444
+ this.heroes = heroes.filter(h => {
1445
+ return h.userId != this.myUserId;
1380
1446
  });
1381
1447
  }
1382
1448
  this.emit(RoomEvent.Summary, summary);
1383
1449
  }
1384
1450
 
1451
+ /**
1452
+ * Takes information from the MSC4186 room summary and updates the room with it.
1453
+ *
1454
+ * @param heroes - The room's hero members
1455
+ * @param joinedCount - The number of joined members
1456
+ * @param invitedCount - The number of invited members
1457
+ */
1458
+ setMSC4186SummaryData(heroes, joinedCount, invitedCount) {
1459
+ if (heroes) {
1460
+ this.heroes = heroes.filter(h => h.user_id !== this.myUserId).map(h => ({
1461
+ userId: h.user_id,
1462
+ displayName: h.displayname,
1463
+ avatarUrl: h.avatar_url,
1464
+ fromMSC4186: true
1465
+ }));
1466
+ }
1467
+ if (joinedCount !== undefined && Number.isInteger(joinedCount)) {
1468
+ this.currentState.setJoinedMemberCount(joinedCount);
1469
+ }
1470
+ if (invitedCount !== undefined && Number.isInteger(invitedCount)) {
1471
+ this.currentState.setInvitedMemberCount(invitedCount);
1472
+ }
1473
+
1474
+ // Construct a summary object to emit as the event wants the info in a single object
1475
+ // more like old-style (/v3/sync) summaries.
1476
+ this.emit(RoomEvent.Summary, {
1477
+ "m.heroes": this.heroes ? this.heroes.map(h => h.userId) : [],
1478
+ "m.joined_member_count": joinedCount,
1479
+ "m.invited_member_count": invitedCount
1480
+ });
1481
+ }
1482
+
1385
1483
  /**
1386
1484
  * Whether to send encrypted messages to devices within this room.
1387
1485
  * @param value - true to blacklist unverified devices, null
@@ -3005,18 +3103,25 @@ export class Room extends ReadReceipt {
3005
3103
  // get service members (e.g. helper bots) for exclusion
3006
3104
  var excludedUserIds = this.getFunctionalMembers();
3007
3105
 
3008
- // get members that are NOT ourselves and are actually in the room.
3106
+ // get members from heroes that are NOT ourselves
3009
3107
  var otherNames = [];
3010
- if (this.summaryHeroes) {
3011
- // if we have a summary, the member state events should be in the room state
3012
- this.summaryHeroes.forEach(userId => {
3108
+ if (this.heroes) {
3109
+ // if we have heroes, use those as the names
3110
+ this.heroes.forEach(hero => {
3013
3111
  // filter service members
3014
- if (excludedUserIds.includes(userId)) {
3112
+ if (excludedUserIds.includes(hero.userId)) {
3015
3113
  inviteJoinCount--;
3016
3114
  return;
3017
3115
  }
3018
- var member = this.getMember(userId);
3019
- otherNames.push(member ? member.name : userId);
3116
+ // If the hero has a display name, use that.
3117
+ // Otherwise, look their user ID up in the membership and use
3118
+ // the name from there, or the user ID as a last resort.
3119
+ if (hero.displayName) {
3120
+ otherNames.push(hero.displayName);
3121
+ } else {
3122
+ var member = this.getMember(hero.userId);
3123
+ otherNames.push(member ? member.name : hero.userId);
3124
+ }
3020
3125
  });
3021
3126
  } else {
3022
3127
  var otherMembers = this.currentState.getMembers().filter(m => {