@unwanted/matrix-sdk-mini 34.12.0 → 36.0.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 (759) hide show
  1. package/git-revision.txt +1 -1
  2. package/lib/@types/event.d.ts +25 -19
  3. package/lib/@types/event.d.ts.map +1 -1
  4. package/lib/@types/event.js +5 -0
  5. package/lib/@types/event.js.map +1 -1
  6. package/lib/@types/global.d.js +0 -2
  7. package/lib/@types/global.d.js.map +1 -1
  8. package/lib/autodiscovery.d.ts +1 -1
  9. package/lib/autodiscovery.d.ts.map +1 -1
  10. package/lib/autodiscovery.js.map +1 -1
  11. package/lib/base64.d.ts +3 -6
  12. package/lib/base64.d.ts.map +1 -1
  13. package/lib/base64.js +43 -36
  14. package/lib/base64.js.map +1 -1
  15. package/lib/browser-index.d.ts.map +1 -1
  16. package/lib/browser-index.js +0 -11
  17. package/lib/browser-index.js.map +1 -1
  18. package/lib/client.d.ts +45 -1306
  19. package/lib/client.d.ts.map +1 -1
  20. package/lib/client.js +406 -2963
  21. package/lib/client.js.map +1 -1
  22. package/lib/digest.d.ts +2 -2
  23. package/lib/digest.d.ts.map +1 -1
  24. package/lib/digest.js +2 -2
  25. package/lib/digest.js.map +1 -1
  26. package/lib/embedded.d.ts +2 -23
  27. package/lib/embedded.d.ts.map +1 -1
  28. package/lib/embedded.js +82 -209
  29. package/lib/embedded.js.map +1 -1
  30. package/lib/event-mapper.d.ts.map +1 -1
  31. package/lib/event-mapper.js +0 -4
  32. package/lib/event-mapper.js.map +1 -1
  33. package/lib/feature.d.ts.map +1 -1
  34. package/lib/feature.js +2 -1
  35. package/lib/feature.js.map +1 -1
  36. package/lib/http-api/errors.d.ts +3 -3
  37. package/lib/http-api/errors.js +3 -3
  38. package/lib/http-api/errors.js.map +1 -1
  39. package/lib/http-api/utils.js +2 -2
  40. package/lib/http-api/utils.js.map +1 -1
  41. package/lib/matrix.d.ts +0 -25
  42. package/lib/matrix.d.ts.map +1 -1
  43. package/lib/matrix.js +1 -30
  44. package/lib/matrix.js.map +1 -1
  45. package/lib/models/MSC3089Branch.d.ts.map +1 -1
  46. package/lib/models/MSC3089Branch.js +0 -3
  47. package/lib/models/MSC3089Branch.js.map +1 -1
  48. package/lib/models/event-timeline-set.d.ts +6 -10
  49. package/lib/models/event-timeline-set.d.ts.map +1 -1
  50. package/lib/models/event-timeline-set.js +28 -36
  51. package/lib/models/event-timeline-set.js.map +1 -1
  52. package/lib/models/event-timeline.d.ts +7 -2
  53. package/lib/models/event-timeline.d.ts.map +1 -1
  54. package/lib/models/event-timeline.js +9 -30
  55. package/lib/models/event-timeline.js.map +1 -1
  56. package/lib/models/event.d.ts +12 -96
  57. package/lib/models/event.d.ts.map +1 -1
  58. package/lib/models/event.js +59 -286
  59. package/lib/models/event.js.map +1 -1
  60. package/lib/models/invites-ignorer-types.d.ts +27 -0
  61. package/lib/models/invites-ignorer-types.d.ts.map +1 -0
  62. package/lib/models/invites-ignorer-types.js +36 -0
  63. package/lib/models/invites-ignorer-types.js.map +1 -0
  64. package/lib/models/invites-ignorer.d.ts +2 -26
  65. package/lib/models/invites-ignorer.d.ts.map +1 -1
  66. package/lib/models/invites-ignorer.js +2 -27
  67. package/lib/models/invites-ignorer.js.map +1 -1
  68. package/lib/models/poll.d.ts.map +1 -1
  69. package/lib/models/poll.js +1 -5
  70. package/lib/models/poll.js.map +1 -1
  71. package/lib/models/relations-container.d.ts.map +1 -1
  72. package/lib/models/relations-container.js +1 -7
  73. package/lib/models/relations-container.js.map +1 -1
  74. package/lib/models/relations.d.ts +0 -1
  75. package/lib/models/relations.d.ts.map +1 -1
  76. package/lib/models/relations.js +0 -8
  77. package/lib/models/relations.js.map +1 -1
  78. package/lib/models/room-member.d.ts +6 -1
  79. package/lib/models/room-member.d.ts.map +1 -1
  80. package/lib/models/room-member.js +7 -1
  81. package/lib/models/room-member.js.map +1 -1
  82. package/lib/models/room-state.d.ts +2 -13
  83. package/lib/models/room-state.d.ts.map +1 -1
  84. package/lib/models/room-state.js +12 -56
  85. package/lib/models/room-state.js.map +1 -1
  86. package/lib/models/room.d.ts +8 -21
  87. package/lib/models/room.d.ts.map +1 -1
  88. package/lib/models/room.js +128 -163
  89. package/lib/models/room.js.map +1 -1
  90. package/lib/models/thread.d.ts.map +1 -1
  91. package/lib/models/thread.js +5 -4
  92. package/lib/models/thread.js.map +1 -1
  93. package/lib/oidc/authorize.d.ts +2 -2
  94. package/lib/oidc/authorize.d.ts.map +1 -1
  95. package/lib/oidc/authorize.js +5 -5
  96. package/lib/oidc/authorize.js.map +1 -1
  97. package/lib/oidc/discovery.d.ts +8 -0
  98. package/lib/oidc/discovery.d.ts.map +1 -1
  99. package/lib/oidc/discovery.js +22 -11
  100. package/lib/oidc/discovery.js.map +1 -1
  101. package/lib/oidc/index.d.ts +3 -4
  102. package/lib/oidc/index.d.ts.map +1 -1
  103. package/lib/oidc/index.js.map +1 -1
  104. package/lib/oidc/register.js +3 -3
  105. package/lib/oidc/register.js.map +1 -1
  106. package/lib/oidc/tokenRefresher.d.ts.map +1 -1
  107. package/lib/oidc/tokenRefresher.js +6 -5
  108. package/lib/oidc/tokenRefresher.js.map +1 -1
  109. package/lib/oidc/validate.d.ts +9 -23
  110. package/lib/oidc/validate.d.ts.map +1 -1
  111. package/lib/oidc/validate.js +13 -28
  112. package/lib/oidc/validate.js.map +1 -1
  113. package/lib/randomstring.d.ts +30 -3
  114. package/lib/randomstring.d.ts.map +1 -1
  115. package/lib/randomstring.js +68 -16
  116. package/lib/randomstring.js.map +1 -1
  117. package/lib/sliding-sync-sdk.d.ts +3 -4
  118. package/lib/sliding-sync-sdk.d.ts.map +1 -1
  119. package/lib/sliding-sync-sdk.js +55 -102
  120. package/lib/sliding-sync-sdk.js.map +1 -1
  121. package/lib/sliding-sync.js +9 -6
  122. package/lib/sliding-sync.js.map +1 -1
  123. package/lib/store/indexeddb-local-backend.js +4 -2
  124. package/lib/store/indexeddb-local-backend.js.map +1 -1
  125. package/lib/store/indexeddb.d.ts +1 -1
  126. package/lib/store/indexeddb.d.ts.map +1 -1
  127. package/lib/store/indexeddb.js.map +1 -1
  128. package/lib/sync-accumulator.d.ts +6 -4
  129. package/lib/sync-accumulator.d.ts.map +1 -1
  130. package/lib/sync-accumulator.js +23 -12
  131. package/lib/sync-accumulator.js.map +1 -1
  132. package/lib/sync.d.ts +10 -13
  133. package/lib/sync.d.ts.map +1 -1
  134. package/lib/sync.js +94 -115
  135. package/lib/sync.js.map +1 -1
  136. package/lib/testing.d.ts +13 -44
  137. package/lib/testing.d.ts.map +1 -1
  138. package/lib/testing.js +36 -99
  139. package/lib/testing.js.map +1 -1
  140. package/lib/types.d.ts +0 -1
  141. package/lib/types.d.ts.map +1 -1
  142. package/lib/types.js.map +1 -1
  143. package/package.json +14 -15
  144. package/src/@types/event.ts +19 -36
  145. package/src/@types/global.d.ts +21 -4
  146. package/src/autodiscovery.ts +1 -1
  147. package/src/base64.ts +38 -40
  148. package/src/browser-index.ts +0 -11
  149. package/src/client.ts +175 -3136
  150. package/src/digest.ts +3 -3
  151. package/src/embedded.ts +43 -149
  152. package/src/event-mapper.ts +0 -4
  153. package/src/feature.ts +1 -0
  154. package/src/http-api/errors.ts +3 -3
  155. package/src/http-api/utils.ts +2 -2
  156. package/src/matrix.ts +0 -41
  157. package/src/models/MSC3089Branch.ts +0 -3
  158. package/src/models/event-timeline-set.ts +17 -38
  159. package/src/models/event-timeline.ts +11 -26
  160. package/src/models/event.ts +54 -295
  161. package/src/models/invites-ignorer-types.ts +48 -0
  162. package/src/models/invites-ignorer.ts +7 -42
  163. package/src/models/poll.ts +0 -6
  164. package/src/models/relations-container.ts +1 -8
  165. package/src/models/relations.ts +0 -8
  166. package/src/models/room-member.ts +16 -1
  167. package/src/models/room-state.ts +4 -37
  168. package/src/models/room.ts +34 -69
  169. package/src/models/thread.ts +4 -3
  170. package/src/oidc/authorize.ts +7 -7
  171. package/src/oidc/discovery.ts +16 -10
  172. package/src/oidc/index.ts +3 -4
  173. package/src/oidc/register.ts +3 -3
  174. package/src/oidc/tokenRefresher.ts +3 -2
  175. package/src/oidc/validate.ts +40 -63
  176. package/src/randomstring.ts +65 -19
  177. package/src/sliding-sync-sdk.ts +10 -83
  178. package/src/sliding-sync.ts +6 -6
  179. package/src/store/indexeddb-local-backend.ts +2 -2
  180. package/src/store/indexeddb.ts +1 -1
  181. package/src/sync-accumulator.ts +33 -16
  182. package/src/sync.ts +112 -143
  183. package/src/testing.ts +36 -103
  184. package/src/types.ts +0 -1
  185. package/CHANGELOG.md +0 -5910
  186. package/lib/@types/AESEncryptedSecretStoragePayload.d.ts +0 -14
  187. package/lib/@types/AESEncryptedSecretStoragePayload.d.ts.map +0 -1
  188. package/lib/@types/AESEncryptedSecretStoragePayload.js +0 -1
  189. package/lib/@types/AESEncryptedSecretStoragePayload.js.map +0 -1
  190. package/lib/@types/crypto.d.ts +0 -47
  191. package/lib/@types/crypto.d.ts.map +0 -1
  192. package/lib/@types/crypto.js +0 -1
  193. package/lib/@types/crypto.js.map +0 -1
  194. package/lib/@types/matrix-sdk-crypto-wasm.d.js +0 -1
  195. package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +0 -1
  196. package/lib/common-crypto/CryptoBackend.d.ts +0 -240
  197. package/lib/common-crypto/CryptoBackend.d.ts.map +0 -1
  198. package/lib/common-crypto/CryptoBackend.js +0 -73
  199. package/lib/common-crypto/CryptoBackend.js.map +0 -1
  200. package/lib/common-crypto/key-passphrase.d.ts +0 -14
  201. package/lib/common-crypto/key-passphrase.d.ts.map +0 -1
  202. package/lib/common-crypto/key-passphrase.js +0 -33
  203. package/lib/common-crypto/key-passphrase.js.map +0 -1
  204. package/lib/crypto/CrossSigning.d.ts +0 -184
  205. package/lib/crypto/CrossSigning.d.ts.map +0 -1
  206. package/lib/crypto/CrossSigning.js +0 -718
  207. package/lib/crypto/CrossSigning.js.map +0 -1
  208. package/lib/crypto/DeviceList.d.ts +0 -216
  209. package/lib/crypto/DeviceList.d.ts.map +0 -1
  210. package/lib/crypto/DeviceList.js +0 -892
  211. package/lib/crypto/DeviceList.js.map +0 -1
  212. package/lib/crypto/EncryptionSetup.d.ts +0 -152
  213. package/lib/crypto/EncryptionSetup.d.ts.map +0 -1
  214. package/lib/crypto/EncryptionSetup.js +0 -356
  215. package/lib/crypto/EncryptionSetup.js.map +0 -1
  216. package/lib/crypto/OlmDevice.d.ts +0 -457
  217. package/lib/crypto/OlmDevice.d.ts.map +0 -1
  218. package/lib/crypto/OlmDevice.js +0 -1241
  219. package/lib/crypto/OlmDevice.js.map +0 -1
  220. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts +0 -109
  221. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts.map +0 -1
  222. package/lib/crypto/OutgoingRoomKeyRequestManager.js +0 -415
  223. package/lib/crypto/OutgoingRoomKeyRequestManager.js.map +0 -1
  224. package/lib/crypto/RoomList.d.ts +0 -26
  225. package/lib/crypto/RoomList.d.ts.map +0 -1
  226. package/lib/crypto/RoomList.js +0 -71
  227. package/lib/crypto/RoomList.js.map +0 -1
  228. package/lib/crypto/SecretSharing.d.ts +0 -24
  229. package/lib/crypto/SecretSharing.d.ts.map +0 -1
  230. package/lib/crypto/SecretSharing.js +0 -194
  231. package/lib/crypto/SecretSharing.js.map +0 -1
  232. package/lib/crypto/SecretStorage.d.ts +0 -55
  233. package/lib/crypto/SecretStorage.d.ts.map +0 -1
  234. package/lib/crypto/SecretStorage.js +0 -118
  235. package/lib/crypto/SecretStorage.js.map +0 -1
  236. package/lib/crypto/aes.d.ts +0 -6
  237. package/lib/crypto/aes.d.ts.map +0 -1
  238. package/lib/crypto/aes.js +0 -24
  239. package/lib/crypto/aes.js.map +0 -1
  240. package/lib/crypto/algorithms/base.d.ts +0 -156
  241. package/lib/crypto/algorithms/base.d.ts.map +0 -1
  242. package/lib/crypto/algorithms/base.js +0 -187
  243. package/lib/crypto/algorithms/base.js.map +0 -1
  244. package/lib/crypto/algorithms/index.d.ts +0 -4
  245. package/lib/crypto/algorithms/index.d.ts.map +0 -1
  246. package/lib/crypto/algorithms/index.js +0 -20
  247. package/lib/crypto/algorithms/index.js.map +0 -1
  248. package/lib/crypto/algorithms/megolm.d.ts +0 -385
  249. package/lib/crypto/algorithms/megolm.d.ts.map +0 -1
  250. package/lib/crypto/algorithms/megolm.js +0 -1822
  251. package/lib/crypto/algorithms/megolm.js.map +0 -1
  252. package/lib/crypto/algorithms/olm.d.ts +0 -5
  253. package/lib/crypto/algorithms/olm.d.ts.map +0 -1
  254. package/lib/crypto/algorithms/olm.js +0 -299
  255. package/lib/crypto/algorithms/olm.js.map +0 -1
  256. package/lib/crypto/api.d.ts +0 -32
  257. package/lib/crypto/api.d.ts.map +0 -1
  258. package/lib/crypto/api.js +0 -22
  259. package/lib/crypto/api.js.map +0 -1
  260. package/lib/crypto/backup.d.ts +0 -227
  261. package/lib/crypto/backup.d.ts.map +0 -1
  262. package/lib/crypto/backup.js +0 -824
  263. package/lib/crypto/backup.js.map +0 -1
  264. package/lib/crypto/crypto.d.ts +0 -3
  265. package/lib/crypto/crypto.d.ts.map +0 -1
  266. package/lib/crypto/crypto.js +0 -19
  267. package/lib/crypto/crypto.js.map +0 -1
  268. package/lib/crypto/dehydration.d.ts +0 -34
  269. package/lib/crypto/dehydration.d.ts.map +0 -1
  270. package/lib/crypto/dehydration.js +0 -252
  271. package/lib/crypto/dehydration.js.map +0 -1
  272. package/lib/crypto/device-converter.d.ts +0 -9
  273. package/lib/crypto/device-converter.d.ts.map +0 -1
  274. package/lib/crypto/device-converter.js +0 -42
  275. package/lib/crypto/device-converter.js.map +0 -1
  276. package/lib/crypto/deviceinfo.d.ts +0 -99
  277. package/lib/crypto/deviceinfo.d.ts.map +0 -1
  278. package/lib/crypto/deviceinfo.js +0 -148
  279. package/lib/crypto/deviceinfo.js.map +0 -1
  280. package/lib/crypto/index.d.ts +0 -1210
  281. package/lib/crypto/index.d.ts.map +0 -1
  282. package/lib/crypto/index.js +0 -4101
  283. package/lib/crypto/index.js.map +0 -1
  284. package/lib/crypto/key_passphrase.d.ts +0 -14
  285. package/lib/crypto/key_passphrase.d.ts.map +0 -1
  286. package/lib/crypto/key_passphrase.js +0 -44
  287. package/lib/crypto/key_passphrase.js.map +0 -1
  288. package/lib/crypto/keybackup.d.ts +0 -18
  289. package/lib/crypto/keybackup.d.ts.map +0 -1
  290. package/lib/crypto/keybackup.js +0 -1
  291. package/lib/crypto/keybackup.js.map +0 -1
  292. package/lib/crypto/olmlib.d.ts +0 -129
  293. package/lib/crypto/olmlib.d.ts.map +0 -1
  294. package/lib/crypto/olmlib.js +0 -492
  295. package/lib/crypto/olmlib.js.map +0 -1
  296. package/lib/crypto/recoverykey.d.ts +0 -2
  297. package/lib/crypto/recoverykey.d.ts.map +0 -1
  298. package/lib/crypto/recoverykey.js +0 -19
  299. package/lib/crypto/recoverykey.js.map +0 -1
  300. package/lib/crypto/store/base.d.ts +0 -252
  301. package/lib/crypto/store/base.d.ts.map +0 -1
  302. package/lib/crypto/store/base.js +0 -64
  303. package/lib/crypto/store/base.js.map +0 -1
  304. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts +0 -187
  305. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +0 -1
  306. package/lib/crypto/store/indexeddb-crypto-store-backend.js +0 -1145
  307. package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +0 -1
  308. package/lib/crypto/store/indexeddb-crypto-store.d.ts +0 -432
  309. package/lib/crypto/store/indexeddb-crypto-store.d.ts.map +0 -1
  310. package/lib/crypto/store/indexeddb-crypto-store.js +0 -728
  311. package/lib/crypto/store/indexeddb-crypto-store.js.map +0 -1
  312. package/lib/crypto/store/localStorage-crypto-store.d.ts +0 -119
  313. package/lib/crypto/store/localStorage-crypto-store.d.ts.map +0 -1
  314. package/lib/crypto/store/localStorage-crypto-store.js +0 -531
  315. package/lib/crypto/store/localStorage-crypto-store.js.map +0 -1
  316. package/lib/crypto/store/memory-crypto-store.d.ts +0 -215
  317. package/lib/crypto/store/memory-crypto-store.d.ts.map +0 -1
  318. package/lib/crypto/store/memory-crypto-store.js +0 -622
  319. package/lib/crypto/store/memory-crypto-store.js.map +0 -1
  320. package/lib/crypto/verification/Base.d.ts +0 -105
  321. package/lib/crypto/verification/Base.d.ts.map +0 -1
  322. package/lib/crypto/verification/Base.js +0 -372
  323. package/lib/crypto/verification/Base.js.map +0 -1
  324. package/lib/crypto/verification/Error.d.ts +0 -35
  325. package/lib/crypto/verification/Error.d.ts.map +0 -1
  326. package/lib/crypto/verification/Error.js +0 -86
  327. package/lib/crypto/verification/Error.js.map +0 -1
  328. package/lib/crypto/verification/IllegalMethod.d.ts +0 -15
  329. package/lib/crypto/verification/IllegalMethod.d.ts.map +0 -1
  330. package/lib/crypto/verification/IllegalMethod.js +0 -43
  331. package/lib/crypto/verification/IllegalMethod.js.map +0 -1
  332. package/lib/crypto/verification/QRCode.d.ts +0 -51
  333. package/lib/crypto/verification/QRCode.d.ts.map +0 -1
  334. package/lib/crypto/verification/QRCode.js +0 -277
  335. package/lib/crypto/verification/QRCode.js.map +0 -1
  336. package/lib/crypto/verification/SAS.d.ts +0 -27
  337. package/lib/crypto/verification/SAS.d.ts.map +0 -1
  338. package/lib/crypto/verification/SAS.js +0 -485
  339. package/lib/crypto/verification/SAS.js.map +0 -1
  340. package/lib/crypto/verification/SASDecimal.d.ts +0 -8
  341. package/lib/crypto/verification/SASDecimal.d.ts.map +0 -1
  342. package/lib/crypto/verification/SASDecimal.js +0 -34
  343. package/lib/crypto/verification/SASDecimal.js.map +0 -1
  344. package/lib/crypto/verification/request/Channel.d.ts +0 -18
  345. package/lib/crypto/verification/request/Channel.d.ts.map +0 -1
  346. package/lib/crypto/verification/request/Channel.js +0 -1
  347. package/lib/crypto/verification/request/Channel.js.map +0 -1
  348. package/lib/crypto/verification/request/InRoomChannel.d.ts +0 -113
  349. package/lib/crypto/verification/request/InRoomChannel.d.ts.map +0 -1
  350. package/lib/crypto/verification/request/InRoomChannel.js +0 -351
  351. package/lib/crypto/verification/request/InRoomChannel.js.map +0 -1
  352. package/lib/crypto/verification/request/ToDeviceChannel.d.ts +0 -105
  353. package/lib/crypto/verification/request/ToDeviceChannel.d.ts.map +0 -1
  354. package/lib/crypto/verification/request/ToDeviceChannel.js +0 -328
  355. package/lib/crypto/verification/request/ToDeviceChannel.js.map +0 -1
  356. package/lib/crypto/verification/request/VerificationRequest.d.ts +0 -227
  357. package/lib/crypto/verification/request/VerificationRequest.d.ts.map +0 -1
  358. package/lib/crypto/verification/request/VerificationRequest.js +0 -937
  359. package/lib/crypto/verification/request/VerificationRequest.js.map +0 -1
  360. package/lib/crypto-api/CryptoEvent.d.ts +0 -69
  361. package/lib/crypto-api/CryptoEvent.d.ts.map +0 -1
  362. package/lib/crypto-api/CryptoEvent.js +0 -33
  363. package/lib/crypto-api/CryptoEvent.js.map +0 -1
  364. package/lib/crypto-api/CryptoEventHandlerMap.d.ts +0 -16
  365. package/lib/crypto-api/CryptoEventHandlerMap.d.ts.map +0 -1
  366. package/lib/crypto-api/CryptoEventHandlerMap.js +0 -22
  367. package/lib/crypto-api/CryptoEventHandlerMap.js.map +0 -1
  368. package/lib/crypto-api/index.d.ts +0 -978
  369. package/lib/crypto-api/index.d.ts.map +0 -1
  370. package/lib/crypto-api/index.js +0 -304
  371. package/lib/crypto-api/index.js.map +0 -1
  372. package/lib/crypto-api/key-passphrase.d.ts +0 -11
  373. package/lib/crypto-api/key-passphrase.d.ts.map +0 -1
  374. package/lib/crypto-api/key-passphrase.js +0 -51
  375. package/lib/crypto-api/key-passphrase.js.map +0 -1
  376. package/lib/crypto-api/keybackup.d.ts +0 -88
  377. package/lib/crypto-api/keybackup.d.ts.map +0 -1
  378. package/lib/crypto-api/keybackup.js +0 -1
  379. package/lib/crypto-api/keybackup.js.map +0 -1
  380. package/lib/crypto-api/recovery-key.d.ts +0 -11
  381. package/lib/crypto-api/recovery-key.d.ts.map +0 -1
  382. package/lib/crypto-api/recovery-key.js +0 -65
  383. package/lib/crypto-api/recovery-key.js.map +0 -1
  384. package/lib/crypto-api/verification.d.ts +0 -344
  385. package/lib/crypto-api/verification.d.ts.map +0 -1
  386. package/lib/crypto-api/verification.js +0 -91
  387. package/lib/crypto-api/verification.js.map +0 -1
  388. package/lib/matrixrtc/CallMembership.d.ts +0 -66
  389. package/lib/matrixrtc/CallMembership.d.ts.map +0 -1
  390. package/lib/matrixrtc/CallMembership.js +0 -197
  391. package/lib/matrixrtc/CallMembership.js.map +0 -1
  392. package/lib/matrixrtc/LivekitFocus.d.ts +0 -16
  393. package/lib/matrixrtc/LivekitFocus.d.ts.map +0 -1
  394. package/lib/matrixrtc/LivekitFocus.js +0 -20
  395. package/lib/matrixrtc/LivekitFocus.js.map +0 -1
  396. package/lib/matrixrtc/MatrixRTCSession.d.ts +0 -295
  397. package/lib/matrixrtc/MatrixRTCSession.d.ts.map +0 -1
  398. package/lib/matrixrtc/MatrixRTCSession.js +0 -1043
  399. package/lib/matrixrtc/MatrixRTCSession.js.map +0 -1
  400. package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +0 -40
  401. package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +0 -1
  402. package/lib/matrixrtc/MatrixRTCSessionManager.js +0 -146
  403. package/lib/matrixrtc/MatrixRTCSessionManager.js.map +0 -1
  404. package/lib/matrixrtc/focus.d.ts +0 -10
  405. package/lib/matrixrtc/focus.d.ts.map +0 -1
  406. package/lib/matrixrtc/focus.js +0 -1
  407. package/lib/matrixrtc/focus.js.map +0 -1
  408. package/lib/matrixrtc/index.d.ts +0 -7
  409. package/lib/matrixrtc/index.d.ts.map +0 -1
  410. package/lib/matrixrtc/index.js +0 -21
  411. package/lib/matrixrtc/index.js.map +0 -1
  412. package/lib/matrixrtc/types.d.ts +0 -19
  413. package/lib/matrixrtc/types.d.ts.map +0 -1
  414. package/lib/matrixrtc/types.js +0 -1
  415. package/lib/matrixrtc/types.js.map +0 -1
  416. package/lib/rendezvous/MSC4108SignInWithQR.d.ts +0 -112
  417. package/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +0 -1
  418. package/lib/rendezvous/MSC4108SignInWithQR.js +0 -392
  419. package/lib/rendezvous/MSC4108SignInWithQR.js.map +0 -1
  420. package/lib/rendezvous/RendezvousChannel.d.ts +0 -27
  421. package/lib/rendezvous/RendezvousChannel.d.ts.map +0 -1
  422. package/lib/rendezvous/RendezvousChannel.js +0 -1
  423. package/lib/rendezvous/RendezvousChannel.js.map +0 -1
  424. package/lib/rendezvous/RendezvousCode.d.ts +0 -9
  425. package/lib/rendezvous/RendezvousCode.d.ts.map +0 -1
  426. package/lib/rendezvous/RendezvousCode.js +0 -1
  427. package/lib/rendezvous/RendezvousCode.js.map +0 -1
  428. package/lib/rendezvous/RendezvousError.d.ts +0 -6
  429. package/lib/rendezvous/RendezvousError.d.ts.map +0 -1
  430. package/lib/rendezvous/RendezvousError.js +0 -23
  431. package/lib/rendezvous/RendezvousError.js.map +0 -1
  432. package/lib/rendezvous/RendezvousFailureReason.d.ts +0 -31
  433. package/lib/rendezvous/RendezvousFailureReason.d.ts.map +0 -1
  434. package/lib/rendezvous/RendezvousFailureReason.js +0 -38
  435. package/lib/rendezvous/RendezvousFailureReason.js.map +0 -1
  436. package/lib/rendezvous/RendezvousIntent.d.ts +0 -5
  437. package/lib/rendezvous/RendezvousIntent.d.ts.map +0 -1
  438. package/lib/rendezvous/RendezvousIntent.js +0 -22
  439. package/lib/rendezvous/RendezvousIntent.js.map +0 -1
  440. package/lib/rendezvous/RendezvousTransport.d.ts +0 -36
  441. package/lib/rendezvous/RendezvousTransport.d.ts.map +0 -1
  442. package/lib/rendezvous/RendezvousTransport.js +0 -1
  443. package/lib/rendezvous/RendezvousTransport.js.map +0 -1
  444. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts +0 -58
  445. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +0 -1
  446. package/lib/rendezvous/channels/MSC4108SecureChannel.js +0 -246
  447. package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +0 -1
  448. package/lib/rendezvous/channels/index.d.ts +0 -2
  449. package/lib/rendezvous/channels/index.d.ts.map +0 -1
  450. package/lib/rendezvous/channels/index.js +0 -18
  451. package/lib/rendezvous/channels/index.js.map +0 -1
  452. package/lib/rendezvous/index.d.ts +0 -10
  453. package/lib/rendezvous/index.d.ts.map +0 -1
  454. package/lib/rendezvous/index.js +0 -23
  455. package/lib/rendezvous/index.js.map +0 -1
  456. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +0 -61
  457. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +0 -1
  458. package/lib/rendezvous/transports/MSC4108RendezvousSession.js +0 -253
  459. package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +0 -1
  460. package/lib/rendezvous/transports/index.d.ts +0 -2
  461. package/lib/rendezvous/transports/index.d.ts.map +0 -1
  462. package/lib/rendezvous/transports/index.js +0 -18
  463. package/lib/rendezvous/transports/index.js.map +0 -1
  464. package/lib/rust-crypto/CrossSigningIdentity.d.ts +0 -33
  465. package/lib/rust-crypto/CrossSigningIdentity.d.ts.map +0 -1
  466. package/lib/rust-crypto/CrossSigningIdentity.js +0 -157
  467. package/lib/rust-crypto/CrossSigningIdentity.js.map +0 -1
  468. package/lib/rust-crypto/DehydratedDeviceManager.d.ts +0 -98
  469. package/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +0 -1
  470. package/lib/rust-crypto/DehydratedDeviceManager.js +0 -285
  471. package/lib/rust-crypto/DehydratedDeviceManager.js.map +0 -1
  472. package/lib/rust-crypto/KeyClaimManager.d.ts +0 -33
  473. package/lib/rust-crypto/KeyClaimManager.d.ts.map +0 -1
  474. package/lib/rust-crypto/KeyClaimManager.js +0 -82
  475. package/lib/rust-crypto/KeyClaimManager.js.map +0 -1
  476. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +0 -43
  477. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +0 -1
  478. package/lib/rust-crypto/OutgoingRequestProcessor.js +0 -195
  479. package/lib/rust-crypto/OutgoingRequestProcessor.js.map +0 -1
  480. package/lib/rust-crypto/OutgoingRequestsManager.d.ts +0 -47
  481. package/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +0 -1
  482. package/lib/rust-crypto/OutgoingRequestsManager.js +0 -148
  483. package/lib/rust-crypto/OutgoingRequestsManager.js.map +0 -1
  484. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +0 -120
  485. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +0 -1
  486. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +0 -467
  487. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +0 -1
  488. package/lib/rust-crypto/RoomEncryptor.d.ts +0 -98
  489. package/lib/rust-crypto/RoomEncryptor.d.ts.map +0 -1
  490. package/lib/rust-crypto/RoomEncryptor.js +0 -299
  491. package/lib/rust-crypto/RoomEncryptor.js.map +0 -1
  492. package/lib/rust-crypto/backup.d.ts +0 -254
  493. package/lib/rust-crypto/backup.d.ts.map +0 -1
  494. package/lib/rust-crypto/backup.js +0 -837
  495. package/lib/rust-crypto/backup.js.map +0 -1
  496. package/lib/rust-crypto/constants.d.ts +0 -3
  497. package/lib/rust-crypto/constants.d.ts.map +0 -1
  498. package/lib/rust-crypto/constants.js +0 -19
  499. package/lib/rust-crypto/constants.js.map +0 -1
  500. package/lib/rust-crypto/device-converter.d.ts +0 -28
  501. package/lib/rust-crypto/device-converter.d.ts.map +0 -1
  502. package/lib/rust-crypto/device-converter.js +0 -123
  503. package/lib/rust-crypto/device-converter.js.map +0 -1
  504. package/lib/rust-crypto/index.d.ts +0 -61
  505. package/lib/rust-crypto/index.d.ts.map +0 -1
  506. package/lib/rust-crypto/index.js +0 -152
  507. package/lib/rust-crypto/index.js.map +0 -1
  508. package/lib/rust-crypto/libolm_migration.d.ts +0 -81
  509. package/lib/rust-crypto/libolm_migration.d.ts.map +0 -1
  510. package/lib/rust-crypto/libolm_migration.js +0 -459
  511. package/lib/rust-crypto/libolm_migration.js.map +0 -1
  512. package/lib/rust-crypto/rust-crypto.d.ts +0 -556
  513. package/lib/rust-crypto/rust-crypto.d.ts.map +0 -1
  514. package/lib/rust-crypto/rust-crypto.js +0 -2016
  515. package/lib/rust-crypto/rust-crypto.js.map +0 -1
  516. package/lib/rust-crypto/secret-storage.d.ts +0 -22
  517. package/lib/rust-crypto/secret-storage.d.ts.map +0 -1
  518. package/lib/rust-crypto/secret-storage.js +0 -63
  519. package/lib/rust-crypto/secret-storage.js.map +0 -1
  520. package/lib/rust-crypto/verification.d.ts +0 -319
  521. package/lib/rust-crypto/verification.d.ts.map +0 -1
  522. package/lib/rust-crypto/verification.js +0 -816
  523. package/lib/rust-crypto/verification.js.map +0 -1
  524. package/lib/secret-storage.d.ts +0 -370
  525. package/lib/secret-storage.d.ts.map +0 -1
  526. package/lib/secret-storage.js +0 -466
  527. package/lib/secret-storage.js.map +0 -1
  528. package/lib/utils/decryptAESSecretStorageItem.d.ts +0 -12
  529. package/lib/utils/decryptAESSecretStorageItem.d.ts.map +0 -1
  530. package/lib/utils/decryptAESSecretStorageItem.js +0 -50
  531. package/lib/utils/decryptAESSecretStorageItem.js.map +0 -1
  532. package/lib/utils/encryptAESSecretStorageItem.d.ts +0 -16
  533. package/lib/utils/encryptAESSecretStorageItem.d.ts.map +0 -1
  534. package/lib/utils/encryptAESSecretStorageItem.js +0 -68
  535. package/lib/utils/encryptAESSecretStorageItem.js.map +0 -1
  536. package/lib/utils/internal/deriveKeys.d.ts +0 -10
  537. package/lib/utils/internal/deriveKeys.d.ts.map +0 -1
  538. package/lib/utils/internal/deriveKeys.js +0 -60
  539. package/lib/utils/internal/deriveKeys.js.map +0 -1
  540. package/lib/webrtc/audioContext.d.ts +0 -15
  541. package/lib/webrtc/audioContext.d.ts.map +0 -1
  542. package/lib/webrtc/audioContext.js +0 -46
  543. package/lib/webrtc/audioContext.js.map +0 -1
  544. package/lib/webrtc/call.d.ts +0 -560
  545. package/lib/webrtc/call.d.ts.map +0 -1
  546. package/lib/webrtc/call.js +0 -2541
  547. package/lib/webrtc/call.js.map +0 -1
  548. package/lib/webrtc/callEventHandler.d.ts +0 -37
  549. package/lib/webrtc/callEventHandler.d.ts.map +0 -1
  550. package/lib/webrtc/callEventHandler.js +0 -344
  551. package/lib/webrtc/callEventHandler.js.map +0 -1
  552. package/lib/webrtc/callEventTypes.d.ts +0 -73
  553. package/lib/webrtc/callEventTypes.d.ts.map +0 -1
  554. package/lib/webrtc/callEventTypes.js +0 -13
  555. package/lib/webrtc/callEventTypes.js.map +0 -1
  556. package/lib/webrtc/callFeed.d.ts +0 -128
  557. package/lib/webrtc/callFeed.d.ts.map +0 -1
  558. package/lib/webrtc/callFeed.js +0 -289
  559. package/lib/webrtc/callFeed.js.map +0 -1
  560. package/lib/webrtc/groupCall.d.ts +0 -323
  561. package/lib/webrtc/groupCall.d.ts.map +0 -1
  562. package/lib/webrtc/groupCall.js +0 -1337
  563. package/lib/webrtc/groupCall.js.map +0 -1
  564. package/lib/webrtc/groupCallEventHandler.d.ts +0 -31
  565. package/lib/webrtc/groupCallEventHandler.d.ts.map +0 -1
  566. package/lib/webrtc/groupCallEventHandler.js +0 -178
  567. package/lib/webrtc/groupCallEventHandler.js.map +0 -1
  568. package/lib/webrtc/mediaHandler.d.ts +0 -89
  569. package/lib/webrtc/mediaHandler.d.ts.map +0 -1
  570. package/lib/webrtc/mediaHandler.js +0 -437
  571. package/lib/webrtc/mediaHandler.js.map +0 -1
  572. package/lib/webrtc/stats/callFeedStatsReporter.d.ts +0 -8
  573. package/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +0 -1
  574. package/lib/webrtc/stats/callFeedStatsReporter.js +0 -82
  575. package/lib/webrtc/stats/callFeedStatsReporter.js.map +0 -1
  576. package/lib/webrtc/stats/callStatsReportGatherer.d.ts +0 -25
  577. package/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +0 -1
  578. package/lib/webrtc/stats/callStatsReportGatherer.js +0 -199
  579. package/lib/webrtc/stats/callStatsReportGatherer.js.map +0 -1
  580. package/lib/webrtc/stats/callStatsReportSummary.d.ts +0 -17
  581. package/lib/webrtc/stats/callStatsReportSummary.d.ts.map +0 -1
  582. package/lib/webrtc/stats/callStatsReportSummary.js +0 -1
  583. package/lib/webrtc/stats/callStatsReportSummary.js.map +0 -1
  584. package/lib/webrtc/stats/connectionStats.d.ts +0 -28
  585. package/lib/webrtc/stats/connectionStats.d.ts.map +0 -1
  586. package/lib/webrtc/stats/connectionStats.js +0 -26
  587. package/lib/webrtc/stats/connectionStats.js.map +0 -1
  588. package/lib/webrtc/stats/connectionStatsBuilder.d.ts +0 -5
  589. package/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +0 -1
  590. package/lib/webrtc/stats/connectionStatsBuilder.js +0 -27
  591. package/lib/webrtc/stats/connectionStatsBuilder.js.map +0 -1
  592. package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts +0 -7
  593. package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +0 -1
  594. package/lib/webrtc/stats/connectionStatsReportBuilder.js +0 -121
  595. package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +0 -1
  596. package/lib/webrtc/stats/groupCallStats.d.ts +0 -22
  597. package/lib/webrtc/stats/groupCallStats.d.ts.map +0 -1
  598. package/lib/webrtc/stats/groupCallStats.js +0 -78
  599. package/lib/webrtc/stats/groupCallStats.js.map +0 -1
  600. package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts +0 -10
  601. package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +0 -1
  602. package/lib/webrtc/stats/media/mediaSsrcHandler.js +0 -57
  603. package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +0 -1
  604. package/lib/webrtc/stats/media/mediaTrackHandler.d.ts +0 -12
  605. package/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +0 -1
  606. package/lib/webrtc/stats/media/mediaTrackHandler.js +0 -62
  607. package/lib/webrtc/stats/media/mediaTrackHandler.js.map +0 -1
  608. package/lib/webrtc/stats/media/mediaTrackStats.d.ts +0 -86
  609. package/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +0 -1
  610. package/lib/webrtc/stats/media/mediaTrackStats.js +0 -142
  611. package/lib/webrtc/stats/media/mediaTrackStats.js.map +0 -1
  612. package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts +0 -22
  613. package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +0 -1
  614. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +0 -76
  615. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +0 -1
  616. package/lib/webrtc/stats/statsReport.d.ts +0 -99
  617. package/lib/webrtc/stats/statsReport.d.ts.map +0 -1
  618. package/lib/webrtc/stats/statsReport.js +0 -32
  619. package/lib/webrtc/stats/statsReport.js.map +0 -1
  620. package/lib/webrtc/stats/statsReportEmitter.d.ts +0 -15
  621. package/lib/webrtc/stats/statsReportEmitter.d.ts.map +0 -1
  622. package/lib/webrtc/stats/statsReportEmitter.js +0 -33
  623. package/lib/webrtc/stats/statsReportEmitter.js.map +0 -1
  624. package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts +0 -16
  625. package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +0 -1
  626. package/lib/webrtc/stats/summaryStatsReportGatherer.js +0 -116
  627. package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +0 -1
  628. package/lib/webrtc/stats/trackStatsBuilder.d.ts +0 -19
  629. package/lib/webrtc/stats/trackStatsBuilder.d.ts.map +0 -1
  630. package/lib/webrtc/stats/trackStatsBuilder.js +0 -168
  631. package/lib/webrtc/stats/trackStatsBuilder.js.map +0 -1
  632. package/lib/webrtc/stats/transportStats.d.ts +0 -11
  633. package/lib/webrtc/stats/transportStats.d.ts.map +0 -1
  634. package/lib/webrtc/stats/transportStats.js +0 -1
  635. package/lib/webrtc/stats/transportStats.js.map +0 -1
  636. package/lib/webrtc/stats/transportStatsBuilder.d.ts +0 -5
  637. package/lib/webrtc/stats/transportStatsBuilder.d.ts.map +0 -1
  638. package/lib/webrtc/stats/transportStatsBuilder.js +0 -34
  639. package/lib/webrtc/stats/transportStatsBuilder.js.map +0 -1
  640. package/lib/webrtc/stats/valueFormatter.d.ts +0 -4
  641. package/lib/webrtc/stats/valueFormatter.d.ts.map +0 -1
  642. package/lib/webrtc/stats/valueFormatter.js +0 -25
  643. package/lib/webrtc/stats/valueFormatter.js.map +0 -1
  644. package/src/@types/AESEncryptedSecretStoragePayload.ts +0 -29
  645. package/src/@types/crypto.ts +0 -73
  646. package/src/@types/matrix-sdk-crypto-wasm.d.ts +0 -44
  647. package/src/common-crypto/CryptoBackend.ts +0 -302
  648. package/src/common-crypto/README.md +0 -4
  649. package/src/common-crypto/key-passphrase.ts +0 -43
  650. package/src/crypto/CrossSigning.ts +0 -773
  651. package/src/crypto/DeviceList.ts +0 -989
  652. package/src/crypto/EncryptionSetup.ts +0 -351
  653. package/src/crypto/OlmDevice.ts +0 -1500
  654. package/src/crypto/OutgoingRoomKeyRequestManager.ts +0 -485
  655. package/src/crypto/RoomList.ts +0 -70
  656. package/src/crypto/SecretSharing.ts +0 -240
  657. package/src/crypto/SecretStorage.ts +0 -136
  658. package/src/crypto/aes.ts +0 -23
  659. package/src/crypto/algorithms/base.ts +0 -236
  660. package/src/crypto/algorithms/index.ts +0 -20
  661. package/src/crypto/algorithms/megolm.ts +0 -2216
  662. package/src/crypto/algorithms/olm.ts +0 -381
  663. package/src/crypto/api.ts +0 -70
  664. package/src/crypto/backup.ts +0 -922
  665. package/src/crypto/crypto.ts +0 -18
  666. package/src/crypto/dehydration.ts +0 -272
  667. package/src/crypto/device-converter.ts +0 -45
  668. package/src/crypto/deviceinfo.ts +0 -158
  669. package/src/crypto/index.ts +0 -4418
  670. package/src/crypto/key_passphrase.ts +0 -42
  671. package/src/crypto/keybackup.ts +0 -47
  672. package/src/crypto/olmlib.ts +0 -539
  673. package/src/crypto/recoverykey.ts +0 -18
  674. package/src/crypto/store/base.ts +0 -348
  675. package/src/crypto/store/indexeddb-crypto-store-backend.ts +0 -1250
  676. package/src/crypto/store/indexeddb-crypto-store.ts +0 -845
  677. package/src/crypto/store/localStorage-crypto-store.ts +0 -579
  678. package/src/crypto/store/memory-crypto-store.ts +0 -680
  679. package/src/crypto/verification/Base.ts +0 -409
  680. package/src/crypto/verification/Error.ts +0 -76
  681. package/src/crypto/verification/IllegalMethod.ts +0 -50
  682. package/src/crypto/verification/QRCode.ts +0 -310
  683. package/src/crypto/verification/SAS.ts +0 -494
  684. package/src/crypto/verification/SASDecimal.ts +0 -37
  685. package/src/crypto/verification/request/Channel.ts +0 -34
  686. package/src/crypto/verification/request/InRoomChannel.ts +0 -371
  687. package/src/crypto/verification/request/ToDeviceChannel.ts +0 -354
  688. package/src/crypto/verification/request/VerificationRequest.ts +0 -976
  689. package/src/crypto-api/CryptoEvent.ts +0 -93
  690. package/src/crypto-api/CryptoEventHandlerMap.ts +0 -32
  691. package/src/crypto-api/index.ts +0 -1175
  692. package/src/crypto-api/key-passphrase.ts +0 -58
  693. package/src/crypto-api/keybackup.ts +0 -115
  694. package/src/crypto-api/recovery-key.ts +0 -69
  695. package/src/crypto-api/verification.ts +0 -408
  696. package/src/matrixrtc/CallMembership.ts +0 -247
  697. package/src/matrixrtc/LivekitFocus.ts +0 -39
  698. package/src/matrixrtc/MatrixRTCSession.ts +0 -1319
  699. package/src/matrixrtc/MatrixRTCSessionManager.ts +0 -166
  700. package/src/matrixrtc/focus.ts +0 -25
  701. package/src/matrixrtc/index.ts +0 -22
  702. package/src/matrixrtc/types.ts +0 -36
  703. package/src/rendezvous/MSC4108SignInWithQR.ts +0 -444
  704. package/src/rendezvous/RendezvousChannel.ts +0 -48
  705. package/src/rendezvous/RendezvousCode.ts +0 -25
  706. package/src/rendezvous/RendezvousError.ts +0 -26
  707. package/src/rendezvous/RendezvousFailureReason.ts +0 -49
  708. package/src/rendezvous/RendezvousIntent.ts +0 -20
  709. package/src/rendezvous/RendezvousTransport.ts +0 -58
  710. package/src/rendezvous/channels/MSC4108SecureChannel.ts +0 -270
  711. package/src/rendezvous/channels/index.ts +0 -17
  712. package/src/rendezvous/index.ts +0 -25
  713. package/src/rendezvous/transports/MSC4108RendezvousSession.ts +0 -270
  714. package/src/rendezvous/transports/index.ts +0 -17
  715. package/src/rust-crypto/CrossSigningIdentity.ts +0 -183
  716. package/src/rust-crypto/DehydratedDeviceManager.ts +0 -306
  717. package/src/rust-crypto/KeyClaimManager.ts +0 -86
  718. package/src/rust-crypto/OutgoingRequestProcessor.ts +0 -236
  719. package/src/rust-crypto/OutgoingRequestsManager.ts +0 -143
  720. package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +0 -501
  721. package/src/rust-crypto/RoomEncryptor.ts +0 -352
  722. package/src/rust-crypto/backup.ts +0 -881
  723. package/src/rust-crypto/constants.ts +0 -18
  724. package/src/rust-crypto/device-converter.ts +0 -128
  725. package/src/rust-crypto/index.ts +0 -237
  726. package/src/rust-crypto/libolm_migration.ts +0 -530
  727. package/src/rust-crypto/rust-crypto.ts +0 -2205
  728. package/src/rust-crypto/secret-storage.ts +0 -60
  729. package/src/rust-crypto/verification.ts +0 -830
  730. package/src/secret-storage.ts +0 -693
  731. package/src/utils/decryptAESSecretStorageItem.ts +0 -54
  732. package/src/utils/encryptAESSecretStorageItem.ts +0 -73
  733. package/src/utils/internal/deriveKeys.ts +0 -63
  734. package/src/webrtc/audioContext.ts +0 -44
  735. package/src/webrtc/call.ts +0 -3074
  736. package/src/webrtc/callEventHandler.ts +0 -425
  737. package/src/webrtc/callEventTypes.ts +0 -93
  738. package/src/webrtc/callFeed.ts +0 -364
  739. package/src/webrtc/groupCall.ts +0 -1735
  740. package/src/webrtc/groupCallEventHandler.ts +0 -234
  741. package/src/webrtc/mediaHandler.ts +0 -484
  742. package/src/webrtc/stats/callFeedStatsReporter.ts +0 -94
  743. package/src/webrtc/stats/callStatsReportGatherer.ts +0 -219
  744. package/src/webrtc/stats/callStatsReportSummary.ts +0 -30
  745. package/src/webrtc/stats/connectionStats.ts +0 -47
  746. package/src/webrtc/stats/connectionStatsBuilder.ts +0 -28
  747. package/src/webrtc/stats/connectionStatsReportBuilder.ts +0 -140
  748. package/src/webrtc/stats/groupCallStats.ts +0 -93
  749. package/src/webrtc/stats/media/mediaSsrcHandler.ts +0 -57
  750. package/src/webrtc/stats/media/mediaTrackHandler.ts +0 -76
  751. package/src/webrtc/stats/media/mediaTrackStats.ts +0 -176
  752. package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +0 -90
  753. package/src/webrtc/stats/statsReport.ts +0 -133
  754. package/src/webrtc/stats/statsReportEmitter.ts +0 -49
  755. package/src/webrtc/stats/summaryStatsReportGatherer.ts +0 -148
  756. package/src/webrtc/stats/trackStatsBuilder.ts +0 -207
  757. package/src/webrtc/stats/transportStats.ts +0 -26
  758. package/src/webrtc/stats/transportStatsBuilder.ts +0 -48
  759. package/src/webrtc/stats/valueFormatter.ts +0 -27
@@ -1 +1 @@
1
- {"version":3,"file":"room-state.js","names":["RoomMember","logger","isNumber","removeHiddenChars","EventType","UNSTABLE_MSC2716_MARKER","MatrixEventEvent","GuestAccess","HistoryVisibility","JoinRule","TypedEventEmitter","Beacon","BeaconEvent","getBeaconInfoIdentifier","TypedReEmitter","M_BEACON","M_BEACON_INFO","KnownMembership","OobStatus","RoomStateEvent","RoomState","constructor","roomId","oobMemberFlags","arguments","length","undefined","status","NotStarted","isStartTimelineState","_defineProperty","Map","updateModifiedTime","getJoinedMemberCount","summaryJoinedMemberCount","joinedMemberCount","getMembers","reduce","count","m","membership","Join","setJoinedMemberCount","getInvitedMemberCount","summaryInvitedMemberCount","invitedMemberCount","Invite","setInvitedMemberCount","Object","values","members","getMembersExcept","excludedIds","filter","includes","userId","getMember","getSentinelMember","sentinel","sentinels","member","events","setMembershipEvent","getStateEvents","eventType","stateKey","has","Array","from","get","event","hasLiveBeacons","_this$liveBeaconIds","liveBeaconIds","_liveBeaconIds","clone","copy","forEach","eventsByStateKey","setStateEvents","Finished","isOutOfBand","_copy$getMember","markOutOfBand","setUnknownStateEvents","unknownStateEvents","getType","getStateKey","stateEvents","options","_lastStateEvent$event","_event$event$unsigned","getRoomId","isState","matches","setBeacon","lastStateEvent","getStateEventMatching","lastReplaceId","unsigned","replaces_state","lastId","event_id","newReplaceId","newId","setStateEvent","_event$getContent$dis","updateDisplayNameCache","getContent","displayname","updateThirdPartyTokenCache","emit","Events","onBeaconLivenessChange","Leave","Ban","avatar_url","getPrevContent","getOrCreateMember","updateMember","Members","RoomPowerLevels","oldLastModified","getLastModifiedTime","setPowerLevelEvent","Marker","Update","processBeaconEvents","matrixClient","_this","_asyncToGenerator","beacons","size","beaconByEventIdDict","dict","beacon","beaconInfoId","processBeaconRelation","beaconInfoEventId","addLocations","_loop","_event$getRelation","relatedToEventId","getRelation","v","isEncrypted","decryptEventIfNeeded","_unused","isDecryptionFailure","once","Decrypted","_ret","NewMember","set","beaconIdentifier","isRedacted","_event$getRedactionEv","getRedactionEvent","redacts","destroy","delete","update","reEmitter","reEmit","New","Destroy","LivenessChange","on","bind","identifier","isLive","map","BeaconLiveness","_this$events$get$get","_this$events$get","pwrLvlEvent","needsOutOfBandMembers","outOfBandMembersReady","markOutOfBandMembersStarted","InProgress","markOutOfBandMembersFailed","clearOutOfBandMembers","keys","log","concat","setOutOfBandMembers","e","setOutOfBandMember","stateEvent","existingMember","name","setTypingEvent","getInviteForThreePidToken","token","tokenToInvite","modified","Date","now","getUserIdsWithDisplayName","displayName","_this$displayNameToUs","displayNameToUserIds","maySendRedactionForEvent","mxEvent","canRedact","maySendEvent","RoomRedaction","getSender","hasSufficientPowerLevelFor","powerLevel","action","powerLevelsEvent","powerLevels","requiredLevel","maySendMessage","maySendEventOfType","RoomMessage","mayClientSendStateEvent","stateEventType","cli","isGuest","credentials","maySendStateEvent","state","eventsLevels","stateDefault","eventsDefault","Number","isSafeInteger","state_default","userPowerLevel","users","users_default","events_default","mayTriggerNotifOfType","notifLevelKey","notifLevel","notifications","getJoinRule","_joinRuleEvent$getCon","joinRuleEvent","RoomJoinRules","joinRuleContent","getHistoryVisibility","_historyVisibilityEve","historyVisibilityEvent","RoomHistoryVisibility","historyVisibilityContent","Shared","getGuestAccess","_guestAccessEvent$get","guestAccessEvent","RoomGuestAccess","guestAccessContent","Forbidden","findPredecessor","msc3946ProcessDynamicPredecessor","predecessorEvent","RoomPredecessor","content","predecessor_room_id","eventId","last_known_event_id","viaServers","via_servers","isArray","createEvent","RoomCreate","predecessor","memberEvent","third_party_invite","signed","threePidInvite","RoomThirdPartyInvite","oldName","userIdsToDisplayNames","strippedOldName","existingUserIds","filteredUserIDs","id","strippedDisplayname","_this$displayNameToUs2","arr","push"],"sources":["../../src/models/room-state.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\nimport { RoomMember } from \"./room-member.ts\";\nimport { logger } from \"../logger.ts\";\nimport { isNumber, removeHiddenChars } from \"../utils.ts\";\nimport { EventType, UNSTABLE_MSC2716_MARKER } from \"../@types/event.ts\";\nimport { IEvent, MatrixEvent, MatrixEventEvent } from \"./event.ts\";\nimport { MatrixClient } from \"../client.ts\";\nimport { GuestAccess, HistoryVisibility, JoinRule } from \"../@types/partials.ts\";\nimport { TypedEventEmitter } from \"./typed-event-emitter.ts\";\nimport { Beacon, BeaconEvent, BeaconEventHandlerMap, getBeaconInfoIdentifier, BeaconIdentifier } from \"./beacon.ts\";\nimport { TypedReEmitter } from \"../ReEmitter.ts\";\nimport { M_BEACON, M_BEACON_INFO } from \"../@types/beacon.ts\";\nimport { KnownMembership } from \"../@types/membership.ts\";\nimport { RoomJoinRulesEventContent } from \"../@types/state_events.ts\";\n\nexport interface IMarkerFoundOptions {\n /** Whether the timeline was empty before the marker event arrived in the\n * room. This could be happen in a variety of cases:\n * 1. From the initial sync\n * 2. It's the first state we're seeing after joining the room\n * 3. Or whether it's coming from `syncFromCache`\n *\n * A marker event refers to `UNSTABLE_MSC2716_MARKER` and indicates that\n * history was imported somewhere back in time. It specifically points to an\n * MSC2716 insertion event where the history was imported at. Marker events\n * are sent as state events so they are easily discoverable by clients and\n * homeservers and don't get lost in timeline gaps.\n */\n timelineWasEmpty?: boolean;\n}\n\n// possible statuses for out-of-band member loading\nenum OobStatus {\n NotStarted,\n InProgress,\n Finished,\n}\n\nexport interface IPowerLevelsContent {\n users?: Record<string, number>;\n events?: Record<string, number>;\n notifications?: Partial<Record<\"room\", number>>;\n // eslint-disable-next-line camelcase\n users_default?: number;\n // eslint-disable-next-line camelcase\n events_default?: number;\n // eslint-disable-next-line camelcase\n state_default?: number;\n ban?: number;\n invite?: number;\n kick?: number;\n redact?: number;\n}\n\nexport enum RoomStateEvent {\n Events = \"RoomState.events\",\n Members = \"RoomState.members\",\n NewMember = \"RoomState.newMember\",\n Update = \"RoomState.update\", // signals batches of updates without specificity\n BeaconLiveness = \"RoomState.BeaconLiveness\",\n Marker = \"RoomState.Marker\",\n}\n\nexport type RoomStateEventHandlerMap = {\n /**\n * Fires whenever the event dictionary in room state is updated.\n * This does not guarantee that any related objects (like RoomMember) have been updated.\n * Use RoomStateEvent.Update for that.\n * @param event - The matrix event which caused this event to fire.\n * @param state - The room state whose RoomState.events dictionary\n * was updated.\n * @param prevEvent - The event being replaced by the new state, if\n * known. Note that this can differ from `getPrevContent()` on the new state event\n * as this is the store's view of the last state, not the previous state provided\n * by the server.\n * @example\n * ```\n * matrixClient.on(\"RoomState.events\", function(event, state, prevEvent){\n * var newStateEvent = event;\n * });\n * ```\n */\n [RoomStateEvent.Events]: (event: MatrixEvent, state: RoomState, prevEvent: MatrixEvent | null) => void;\n /**\n * Fires whenever a member in the members dictionary is updated in any way.\n * @param event - The matrix event which caused this event to fire.\n * @param state - The room state whose RoomState.members dictionary\n * was updated.\n * @param member - The room member that was updated.\n * @example\n * ```\n * matrixClient.on(\"RoomState.members\", function(event, state, member){\n * var newMembershipState = member.membership;\n * });\n * ```\n */\n [RoomStateEvent.Members]: (event: MatrixEvent, state: RoomState, member: RoomMember) => void;\n /**\n * Fires whenever a member is added to the members dictionary. The RoomMember\n * will not be fully populated yet (e.g. no membership state) but will already\n * be available in the members dictionary.\n * @param event - The matrix event which caused this event to fire.\n * @param state - The room state whose RoomState.members dictionary\n * was updated with a new entry.\n * @param member - The room member that was added.\n * @example\n * ```\n * matrixClient.on(\"RoomState.newMember\", function(event, state, member){\n * // add event listeners on 'member'\n * });\n * ```\n */\n [RoomStateEvent.NewMember]: (event: MatrixEvent, state: RoomState, member: RoomMember) => void;\n [RoomStateEvent.Update]: (state: RoomState) => void;\n [RoomStateEvent.BeaconLiveness]: (state: RoomState, hasLiveBeacons: boolean) => void;\n [RoomStateEvent.Marker]: (event: MatrixEvent, setStateOptions?: IMarkerFoundOptions) => void;\n [BeaconEvent.New]: (event: MatrixEvent, beacon: Beacon) => void;\n};\n\ntype EmittedEvents = RoomStateEvent | BeaconEvent;\ntype EventHandlerMap = RoomStateEventHandlerMap & BeaconEventHandlerMap;\n\ntype KeysMatching<T, V> = { [K in keyof T]-?: T[K] extends V ? K : never }[keyof T];\n\nexport class RoomState extends TypedEventEmitter<EmittedEvents, EventHandlerMap> {\n public readonly reEmitter = new TypedReEmitter<EmittedEvents, EventHandlerMap>(this);\n private sentinels: Record<string, RoomMember> = {}; // userId: RoomMember\n // stores fuzzy matches to a list of userIDs (applies utils.removeHiddenChars to keys)\n private displayNameToUserIds = new Map<string, string[]>();\n private userIdsToDisplayNames: Record<string, string> = {};\n private tokenToInvite: Record<string, MatrixEvent> = {}; // 3pid invite state_key to m.room.member invite\n private joinedMemberCount: number | null = null; // cache of the number of joined members\n // joined members count from summary api\n // once set, we know the server supports the summary api\n // and we should only trust that\n // we could also only trust that before OOB members\n // are loaded but doesn't seem worth the hassle atm\n private summaryJoinedMemberCount: number | null = null;\n // same for invited member count\n private invitedMemberCount: number | null = null;\n private summaryInvitedMemberCount: number | null = null;\n private modified = -1;\n\n // XXX: Should be read-only\n // The room member dictionary, keyed on the user's ID.\n public members: Record<string, RoomMember> = {}; // userId: RoomMember\n // The state events dictionary, keyed on the event type and then the state_key value.\n public events = new Map<string, Map<string, MatrixEvent>>(); // Map<eventType, Map<stateKey, MatrixEvent>>\n // The pagination token for this state.\n public paginationToken: string | null = null;\n\n public readonly beacons = new Map<BeaconIdentifier, Beacon>();\n private _liveBeaconIds: BeaconIdentifier[] = [];\n\n /**\n * Construct room state.\n *\n * Room State represents the state of the room at a given point.\n * It can be mutated by adding state events to it.\n * There are two types of room member associated with a state event:\n * normal member objects (accessed via getMember/getMembers) which mutate\n * with the state to represent the current state of that room/user, e.g.\n * the object returned by `getMember('@bob:example.com')` will mutate to\n * get a different display name if Bob later changes his display name\n * in the room.\n * There are also 'sentinel' members (accessed via getSentinelMember).\n * These also represent the state of room members at the point in time\n * represented by the RoomState object, but unlike objects from getMember,\n * sentinel objects will always represent the room state as at the time\n * getSentinelMember was called, so if Bob subsequently changes his display\n * name, a room member object previously acquired with getSentinelMember\n * will still have his old display name. Calling getSentinelMember again\n * after the display name change will return a new RoomMember object\n * with Bob's new display name.\n *\n * @param roomId - Optional. The ID of the room which has this state.\n * If none is specified it just tracks paginationTokens, useful for notifTimelineSet\n * @param oobMemberFlags - Optional. The state of loading out of bound members.\n * As the timeline might get reset while they are loading, this state needs to be inherited\n * and shared when the room state is cloned for the new timeline.\n * This should only be passed from clone.\n * @param isStartTimelineState - Optional. This state is marked as a start state.\n * This is used to skip state insertions that are\n * in the wrong order. The order is determined by the `replaces_state` id.\n *\n * Example:\n * A current state events `replaces_state` value is `1`.\n * Trying to insert a state event with `event_id` `1` in its place would fail if isStartTimelineState = false.\n *\n * A current state events `event_id` is `2`.\n * Trying to insert a state event where its `replaces_state` value is `2` would fail if isStartTimelineState = true.\n */\n\n public constructor(\n public readonly roomId: string,\n private oobMemberFlags = { status: OobStatus.NotStarted },\n public readonly isStartTimelineState = false,\n ) {\n super();\n this.updateModifiedTime();\n }\n\n /**\n * Returns the number of joined members in this room\n * This method caches the result.\n * @returns The number of members in this room whose membership is 'join'\n */\n public getJoinedMemberCount(): number {\n if (this.summaryJoinedMemberCount !== null) {\n return this.summaryJoinedMemberCount;\n }\n if (this.joinedMemberCount === null) {\n this.joinedMemberCount = this.getMembers().reduce((count, m) => {\n return m.membership === KnownMembership.Join ? count + 1 : count;\n }, 0);\n }\n return this.joinedMemberCount;\n }\n\n /**\n * Set the joined member count explicitly (like from summary part of the sync response)\n * @param count - the amount of joined members\n */\n public setJoinedMemberCount(count: number): void {\n this.summaryJoinedMemberCount = count;\n }\n\n /**\n * Returns the number of invited members in this room\n * @returns The number of members in this room whose membership is 'invite'\n */\n public getInvitedMemberCount(): number {\n if (this.summaryInvitedMemberCount !== null) {\n return this.summaryInvitedMemberCount;\n }\n if (this.invitedMemberCount === null) {\n this.invitedMemberCount = this.getMembers().reduce((count, m) => {\n return m.membership === KnownMembership.Invite ? count + 1 : count;\n }, 0);\n }\n return this.invitedMemberCount;\n }\n\n /**\n * Set the amount of invited members in this room\n * @param count - the amount of invited members\n */\n public setInvitedMemberCount(count: number): void {\n this.summaryInvitedMemberCount = count;\n }\n\n /**\n * Get all RoomMembers in this room.\n * @returns A list of RoomMembers.\n */\n public getMembers(): RoomMember[] {\n return Object.values(this.members);\n }\n\n /**\n * Get all RoomMembers in this room, excluding the user IDs provided.\n * @param excludedIds - The user IDs to exclude.\n * @returns A list of RoomMembers.\n */\n public getMembersExcept(excludedIds: string[]): RoomMember[] {\n return this.getMembers().filter((m) => !excludedIds.includes(m.userId));\n }\n\n /**\n * Get a room member by their user ID.\n * @param userId - The room member's user ID.\n * @returns The member or null if they do not exist.\n */\n public getMember(userId: string): RoomMember | null {\n return this.members[userId] || null;\n }\n\n /**\n * Get a room member whose properties will not change with this room state. You\n * typically want this if you want to attach a RoomMember to a MatrixEvent which\n * may no longer be represented correctly by Room.currentState or Room.oldState.\n * The term 'sentinel' refers to the fact that this RoomMember is an unchanging\n * guardian for state at this particular point in time.\n * @param userId - The room member's user ID.\n * @returns The member or null if they do not exist.\n */\n public getSentinelMember(userId: string): RoomMember | null {\n if (!userId) return null;\n let sentinel = this.sentinels[userId];\n\n if (sentinel === undefined) {\n sentinel = new RoomMember(this.roomId, userId);\n const member = this.members[userId];\n if (member?.events.member) {\n sentinel.setMembershipEvent(member.events.member, this);\n }\n this.sentinels[userId] = sentinel;\n }\n return sentinel;\n }\n\n /**\n * Get state events from the state of the room.\n * @param eventType - The event type of the state event.\n * @returns A list of events\n */\n public getStateEvents(eventType: EventType | string): MatrixEvent[];\n /**\n * Get state events from the state of the room.\n * @param eventType - The event type of the state event.\n * @param stateKey - The state_key of the state event.\n * @returns A single event (or null if no match found).\n */\n public getStateEvents(eventType: EventType | string, stateKey: string): MatrixEvent | null;\n public getStateEvents(eventType: EventType | string, stateKey?: string): MatrixEvent[] | MatrixEvent | null {\n if (!this.events.has(eventType)) {\n // no match\n return stateKey === undefined ? [] : null;\n }\n if (stateKey === undefined) {\n // return all values\n return Array.from(this.events.get(eventType)!.values());\n }\n const event = this.events.get(eventType)!.get(stateKey);\n return event ? event : null;\n }\n\n public get hasLiveBeacons(): boolean {\n return !!this.liveBeaconIds?.length;\n }\n\n public get liveBeaconIds(): BeaconIdentifier[] {\n return this._liveBeaconIds;\n }\n\n /**\n * Creates a copy of this room state so that mutations to either won't affect the other.\n * @returns the copy of the room state\n */\n public clone(): RoomState {\n const copy = new RoomState(this.roomId, this.oobMemberFlags);\n\n // Ugly hack: because setStateEvents will mark\n // members as susperseding future out of bound members\n // if loading is in progress (through oobMemberFlags)\n // since these are not new members, we're merely copying them\n // set the status to not started\n // after copying, we set back the status\n const status = this.oobMemberFlags.status;\n this.oobMemberFlags.status = OobStatus.NotStarted;\n\n Array.from(this.events.values()).forEach((eventsByStateKey) => {\n copy.setStateEvents(Array.from(eventsByStateKey.values()));\n });\n\n // Ugly hack: see above\n this.oobMemberFlags.status = status;\n\n if (this.summaryInvitedMemberCount !== null) {\n copy.setInvitedMemberCount(this.getInvitedMemberCount());\n }\n if (this.summaryJoinedMemberCount !== null) {\n copy.setJoinedMemberCount(this.getJoinedMemberCount());\n }\n\n // copy out of band flags if needed\n if (this.oobMemberFlags.status == OobStatus.Finished) {\n // copy markOutOfBand flags\n this.getMembers().forEach((member) => {\n if (member.isOutOfBand()) {\n copy.getMember(member.userId)?.markOutOfBand();\n }\n });\n }\n\n return copy;\n }\n\n /**\n * Add previously unknown state events.\n * When lazy loading members while back-paginating,\n * the relevant room state for the timeline chunk at the end\n * of the chunk can be set with this method.\n * @param events - state events to prepend\n */\n public setUnknownStateEvents(events: MatrixEvent[]): void {\n const unknownStateEvents = events.filter((event) => {\n return !this.events.has(event.getType()) || !this.events.get(event.getType())!.has(event.getStateKey()!);\n });\n\n this.setStateEvents(unknownStateEvents);\n }\n\n /**\n * Add an array of one or more state MatrixEvents, overwriting any existing\n * state with the same `{type, stateKey}` tuple. Will fire \"RoomState.events\"\n * for every event added. May fire \"RoomState.members\" if there are\n * `m.room.member` events. May fire \"RoomStateEvent.Marker\" if there are\n * `UNSTABLE_MSC2716_MARKER` events.\n * @param stateEvents - a list of state events for this room.\n *\n * @remarks\n * Fires {@link RoomStateEvent.Members}\n * Fires {@link RoomStateEvent.NewMember}\n * Fires {@link RoomStateEvent.Events}\n * Fires {@link RoomStateEvent.Marker}\n */\n public setStateEvents(stateEvents: MatrixEvent[], options?: IMarkerFoundOptions): void {\n this.updateModifiedTime();\n\n // update the core event dict\n stateEvents.forEach((event) => {\n if (event.getRoomId() !== this.roomId || !event.isState()) return;\n\n if (M_BEACON_INFO.matches(event.getType())) {\n this.setBeacon(event);\n }\n\n const lastStateEvent = this.getStateEventMatching(event);\n\n // Safety measure to not update the room (and emit the update) with older state.\n // The sync loop really should not send old events but it does very regularly.\n // Logging on return in those two conditions results in a large amount of logging. (on startup and when running element)\n const lastReplaceId = lastStateEvent?.event.unsigned?.replaces_state;\n const lastId = lastStateEvent?.event.event_id;\n const newReplaceId = event.event.unsigned?.replaces_state;\n const newId = event.event.event_id;\n if (this.isStartTimelineState) {\n // Add an event to the start of the timeline. Its replace id should not be the same as the one of the current/last start state event.\n if (newReplaceId && lastId && newReplaceId === lastId) return;\n } else {\n // Add an event to the end of the timeline. It should not be the same as the one replaced by the current/last end state event.\n if (lastReplaceId && newId && lastReplaceId === newId) return;\n }\n\n this.setStateEvent(event);\n if (event.getType() === EventType.RoomMember) {\n this.updateDisplayNameCache(event.getStateKey()!, event.getContent().displayname ?? \"\");\n this.updateThirdPartyTokenCache(event);\n }\n this.emit(RoomStateEvent.Events, event, this, lastStateEvent);\n });\n\n this.onBeaconLivenessChange();\n // update higher level data structures. This needs to be done AFTER the\n // core event dict as these structures may depend on other state events in\n // the given array (e.g. disambiguating display names in one go to do both\n // clashing names rather than progressively which only catches 1 of them).\n stateEvents.forEach((event) => {\n if (event.getRoomId() !== this.roomId || !event.isState()) return;\n\n if (event.getType() === EventType.RoomMember) {\n const userId = event.getStateKey()!;\n\n // leave events apparently elide the displayname or avatar_url,\n // so let's fake one up so that we don't leak user ids\n // into the timeline\n if (\n event.getContent().membership === KnownMembership.Leave ||\n event.getContent().membership === KnownMembership.Ban\n ) {\n event.getContent().avatar_url = event.getContent().avatar_url || event.getPrevContent().avatar_url;\n event.getContent().displayname =\n event.getContent().displayname || event.getPrevContent().displayname;\n }\n\n const member = this.getOrCreateMember(userId, event);\n member.setMembershipEvent(event, this);\n this.updateMember(member);\n this.emit(RoomStateEvent.Members, event, this, member);\n } else if (event.getType() === EventType.RoomPowerLevels) {\n // events with unknown state keys should be ignored\n // and should not aggregate onto members power levels\n if (event.getStateKey() !== \"\") {\n return;\n }\n const members = Object.values(this.members);\n members.forEach((member) => {\n // We only propagate `RoomState.members` event if the\n // power levels has been changed\n // large room suffer from large re-rendering especially when not needed\n const oldLastModified = member.getLastModifiedTime();\n member.setPowerLevelEvent(event);\n if (oldLastModified !== member.getLastModifiedTime()) {\n this.emit(RoomStateEvent.Members, event, this, member);\n }\n });\n\n // assume all our sentinels are now out-of-date\n this.sentinels = {};\n } else if (UNSTABLE_MSC2716_MARKER.matches(event.getType())) {\n this.emit(RoomStateEvent.Marker, event, options);\n }\n });\n\n this.emit(RoomStateEvent.Update, this);\n }\n\n public async processBeaconEvents(events: MatrixEvent[], matrixClient: MatrixClient): Promise<void> {\n if (\n !events.length ||\n // discard locations if we have no beacons\n !this.beacons.size\n ) {\n return;\n }\n\n const beaconByEventIdDict = [...this.beacons.values()].reduce<Record<string, Beacon>>((dict, beacon) => {\n dict[beacon.beaconInfoId] = beacon;\n return dict;\n }, {});\n\n const processBeaconRelation = (beaconInfoEventId: string, event: MatrixEvent): void => {\n if (!M_BEACON.matches(event.getType())) {\n return;\n }\n\n const beacon = beaconByEventIdDict[beaconInfoEventId];\n\n if (beacon) {\n beacon.addLocations([event]);\n }\n };\n\n for (const event of events) {\n const relatedToEventId = event.getRelation()?.event_id;\n // not related to a beacon we know about; discard\n if (!relatedToEventId || !beaconByEventIdDict[relatedToEventId]) return;\n if (!M_BEACON.matches(event.getType()) && !event.isEncrypted()) return;\n\n try {\n await matrixClient.decryptEventIfNeeded(event);\n processBeaconRelation(relatedToEventId, event);\n } catch {\n if (event.isDecryptionFailure()) {\n // add an event listener for once the event is decrypted.\n event.once(MatrixEventEvent.Decrypted, async () => {\n processBeaconRelation(relatedToEventId, event);\n });\n }\n }\n }\n }\n\n /**\n * Looks up a member by the given userId, and if it doesn't exist,\n * create it and emit the `RoomState.newMember` event.\n * This method makes sure the member is added to the members dictionary\n * before emitting, as this is done from setStateEvents and setOutOfBandMember.\n * @param userId - the id of the user to look up\n * @param event - the membership event for the (new) member. Used to emit.\n * @returns the member, existing or newly created.\n *\n * @remarks\n * Fires {@link RoomStateEvent.NewMember}\n */\n private getOrCreateMember(userId: string, event: MatrixEvent): RoomMember {\n let member = this.members[userId];\n if (!member) {\n member = new RoomMember(this.roomId, userId);\n // add member to members before emitting any events,\n // as event handlers often lookup the member\n this.members[userId] = member;\n this.emit(RoomStateEvent.NewMember, event, this, member);\n }\n return member;\n }\n\n private setStateEvent(event: MatrixEvent): void {\n if (!this.events.has(event.getType())) {\n this.events.set(event.getType(), new Map());\n }\n this.events.get(event.getType())!.set(event.getStateKey()!, event);\n }\n\n /**\n * @experimental\n */\n private setBeacon(event: MatrixEvent): void {\n const beaconIdentifier = getBeaconInfoIdentifier(event);\n\n if (this.beacons.has(beaconIdentifier)) {\n const beacon = this.beacons.get(beaconIdentifier)!;\n\n if (event.isRedacted()) {\n if (beacon.beaconInfoId === (<IEvent>event.getRedactionEvent())?.redacts) {\n beacon.destroy();\n this.beacons.delete(beaconIdentifier);\n }\n return;\n }\n\n return beacon.update(event);\n }\n\n if (event.isRedacted()) {\n return;\n }\n\n const beacon = new Beacon(event);\n\n this.reEmitter.reEmit<BeaconEvent, BeaconEvent>(beacon, [\n BeaconEvent.New,\n BeaconEvent.Update,\n BeaconEvent.Destroy,\n BeaconEvent.LivenessChange,\n ]);\n\n this.emit(BeaconEvent.New, event, beacon);\n beacon.on(BeaconEvent.LivenessChange, this.onBeaconLivenessChange.bind(this));\n beacon.on(BeaconEvent.Destroy, this.onBeaconLivenessChange.bind(this));\n\n this.beacons.set(beacon.identifier, beacon);\n }\n\n /**\n * @experimental\n * Check liveness of room beacons\n * emit RoomStateEvent.BeaconLiveness event\n */\n private onBeaconLivenessChange(): void {\n this._liveBeaconIds = Array.from(this.beacons.values())\n .filter((beacon) => beacon.isLive)\n .map((beacon) => beacon.identifier);\n\n this.emit(RoomStateEvent.BeaconLiveness, this, this.hasLiveBeacons);\n }\n\n private getStateEventMatching(event: MatrixEvent): MatrixEvent | null {\n return this.events.get(event.getType())?.get(event.getStateKey()!) ?? null;\n }\n\n private updateMember(member: RoomMember): void {\n // this member may have a power level already, so set it.\n const pwrLvlEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n if (pwrLvlEvent) {\n member.setPowerLevelEvent(pwrLvlEvent);\n }\n\n // blow away the sentinel which is now outdated\n delete this.sentinels[member.userId];\n\n this.members[member.userId] = member;\n this.joinedMemberCount = null;\n this.invitedMemberCount = null;\n }\n\n /**\n * Get the out-of-band members loading state, whether loading is needed or not.\n * Note that loading might be in progress and hence isn't needed.\n * @returns whether or not the members of this room need to be loaded\n */\n public needsOutOfBandMembers(): boolean {\n return this.oobMemberFlags.status === OobStatus.NotStarted;\n }\n\n /**\n * Check if loading of out-of-band-members has completed\n *\n * @returns true if the full membership list of this room has been loaded. False if it is not started or is in\n * progress.\n */\n public outOfBandMembersReady(): boolean {\n return this.oobMemberFlags.status === OobStatus.Finished;\n }\n\n /**\n * Mark this room state as waiting for out-of-band members,\n * ensuring it doesn't ask for them to be requested again\n * through needsOutOfBandMembers\n */\n public markOutOfBandMembersStarted(): void {\n if (this.oobMemberFlags.status !== OobStatus.NotStarted) {\n return;\n }\n this.oobMemberFlags.status = OobStatus.InProgress;\n }\n\n /**\n * Mark this room state as having failed to fetch out-of-band members\n */\n public markOutOfBandMembersFailed(): void {\n if (this.oobMemberFlags.status !== OobStatus.InProgress) {\n return;\n }\n this.oobMemberFlags.status = OobStatus.NotStarted;\n }\n\n /**\n * Clears the loaded out-of-band members\n */\n public clearOutOfBandMembers(): void {\n let count = 0;\n Object.keys(this.members).forEach((userId) => {\n const member = this.members[userId];\n if (member.isOutOfBand()) {\n ++count;\n delete this.members[userId];\n }\n });\n logger.log(`LL: RoomState removed ${count} members...`);\n this.oobMemberFlags.status = OobStatus.NotStarted;\n }\n\n /**\n * Sets the loaded out-of-band members.\n * @param stateEvents - array of membership state events\n */\n public setOutOfBandMembers(stateEvents: MatrixEvent[]): void {\n logger.log(`LL: RoomState about to set ${stateEvents.length} OOB members ...`);\n if (this.oobMemberFlags.status !== OobStatus.InProgress) {\n return;\n }\n logger.log(`LL: RoomState put in finished state ...`);\n this.oobMemberFlags.status = OobStatus.Finished;\n stateEvents.forEach((e) => this.setOutOfBandMember(e));\n this.emit(RoomStateEvent.Update, this);\n }\n\n /**\n * Sets a single out of band member, used by both setOutOfBandMembers and clone\n * @param stateEvent - membership state event\n */\n private setOutOfBandMember(stateEvent: MatrixEvent): void {\n if (stateEvent.getType() !== EventType.RoomMember) {\n return;\n }\n const userId = stateEvent.getStateKey()!;\n const existingMember = this.getMember(userId);\n // never replace members received as part of the sync\n if (existingMember && !existingMember.isOutOfBand()) {\n return;\n }\n\n const member = this.getOrCreateMember(userId, stateEvent);\n member.setMembershipEvent(stateEvent, this);\n // needed to know which members need to be stored seperately\n // as they are not part of the sync accumulator\n // this is cleared by setMembershipEvent so when it's updated through /sync\n member.markOutOfBand();\n\n this.updateDisplayNameCache(member.userId, member.name);\n\n this.setStateEvent(stateEvent);\n this.updateMember(member);\n this.emit(RoomStateEvent.Members, stateEvent, this, member);\n }\n\n /**\n * Set the current typing event for this room.\n * @param event - The typing event\n */\n public setTypingEvent(event: MatrixEvent): void {\n Object.values(this.members).forEach(function (member) {\n member.setTypingEvent(event);\n });\n }\n\n /**\n * Get the m.room.member event which has the given third party invite token.\n *\n * @param token - The token\n * @returns The m.room.member event or null\n */\n public getInviteForThreePidToken(token: string): MatrixEvent | null {\n return this.tokenToInvite[token] || null;\n }\n\n /**\n * Update the last modified time to the current time.\n */\n private updateModifiedTime(): void {\n this.modified = Date.now();\n }\n\n /**\n * Get the timestamp when this room state was last updated. This timestamp is\n * updated when this object has received new state events.\n * @returns The timestamp\n */\n public getLastModifiedTime(): number {\n return this.modified;\n }\n\n /**\n * Get user IDs with the specified or similar display names.\n * @param displayName - The display name to get user IDs from.\n * @returns An array of user IDs or an empty array.\n */\n public getUserIdsWithDisplayName(displayName: string): string[] {\n return this.displayNameToUserIds.get(removeHiddenChars(displayName)) ?? [];\n }\n\n /**\n * Returns true if userId is in room, event is not redacted and either sender of\n * mxEvent or has power level sufficient to redact events other than their own.\n * @param mxEvent - The event to test permission for\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given used ID can redact given event\n */\n public maySendRedactionForEvent(mxEvent: MatrixEvent, userId: string): boolean {\n const member = this.getMember(userId);\n if (!member || member.membership === KnownMembership.Leave) return false;\n\n if (mxEvent.status || mxEvent.isRedacted()) return false;\n\n // The user may have been the sender, but they can't redact their own message\n // if redactions are blocked.\n const canRedact = this.maySendEvent(EventType.RoomRedaction, userId);\n\n if (!canRedact) return false;\n if (mxEvent.getSender() === userId) return true;\n\n return this.hasSufficientPowerLevelFor(\"redact\", member.powerLevel);\n }\n\n /**\n * Returns true if the given power level is sufficient for action\n * @param action - The type of power level to check\n * @param powerLevel - The power level of the member\n * @returns true if the given power level is sufficient\n */\n public hasSufficientPowerLevelFor(\n action: KeysMatching<Required<IPowerLevelsContent>, number>,\n powerLevel: number,\n ): boolean {\n const powerLevelsEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n\n let powerLevels: IPowerLevelsContent = {};\n if (powerLevelsEvent) {\n powerLevels = powerLevelsEvent.getContent();\n }\n\n let requiredLevel = 50;\n if (isNumber(powerLevels[action])) {\n requiredLevel = powerLevels[action]!;\n }\n\n return powerLevel >= requiredLevel;\n }\n\n /**\n * Short-form for maySendEvent('m.room.message', userId)\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID should be permitted to send\n * message events into the given room.\n */\n public maySendMessage(userId: string): boolean {\n return this.maySendEventOfType(EventType.RoomMessage, userId, false);\n }\n\n /**\n * Returns true if the given user ID has permission to send a normal\n * event of type `eventType` into this room.\n * @param eventType - The type of event to test\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID should be permitted to send\n * the given type of event into this room,\n * according to the room's state.\n */\n public maySendEvent(eventType: EventType | string, userId: string): boolean {\n return this.maySendEventOfType(eventType, userId, false);\n }\n\n /**\n * Returns true if the given MatrixClient has permission to send a state\n * event of type `stateEventType` into this room.\n * @param stateEventType - The type of state events to test\n * @param cli - The client to test permission for\n * @returns true if the given client should be permitted to send\n * the given type of state event into this room,\n * according to the room's state.\n */\n public mayClientSendStateEvent(stateEventType: EventType | string, cli: MatrixClient): boolean {\n if (cli.isGuest() || !cli.credentials.userId) {\n return false;\n }\n return this.maySendStateEvent(stateEventType, cli.credentials.userId);\n }\n\n /**\n * Returns true if the given user ID has permission to send a state\n * event of type `stateEventType` into this room.\n * @param stateEventType - The type of state events to test\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID should be permitted to send\n * the given type of state event into this room,\n * according to the room's state.\n */\n public maySendStateEvent(stateEventType: EventType | string, userId: string): boolean {\n return this.maySendEventOfType(stateEventType, userId, true);\n }\n\n /**\n * Returns true if the given user ID has permission to send a normal or state\n * event of type `eventType` into this room.\n * @param eventType - The type of event to test\n * @param userId - The user ID of the user to test permission for\n * @param state - If true, tests if the user may send a state\n event of this type. Otherwise tests whether\n they may send a regular event.\n * @returns true if the given user ID should be permitted to send\n * the given type of event into this room,\n * according to the room's state.\n */\n private maySendEventOfType(eventType: EventType | string, userId: string, state: boolean): boolean {\n const powerLevelsEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n\n let powerLevels: IPowerLevelsContent;\n let eventsLevels: Record<EventType | string, number> = {};\n\n let stateDefault = 0;\n let eventsDefault = 0;\n let powerLevel = 0;\n if (powerLevelsEvent) {\n powerLevels = powerLevelsEvent.getContent();\n eventsLevels = powerLevels.events || {};\n\n if (Number.isSafeInteger(powerLevels.state_default)) {\n stateDefault = powerLevels.state_default!;\n } else {\n stateDefault = 50;\n }\n\n const userPowerLevel = powerLevels.users && powerLevels.users[userId];\n if (Number.isSafeInteger(userPowerLevel)) {\n powerLevel = userPowerLevel!;\n } else if (Number.isSafeInteger(powerLevels.users_default)) {\n powerLevel = powerLevels.users_default!;\n }\n\n if (Number.isSafeInteger(powerLevels.events_default)) {\n eventsDefault = powerLevels.events_default!;\n }\n }\n\n let requiredLevel = state ? stateDefault : eventsDefault;\n if (Number.isSafeInteger(eventsLevels[eventType])) {\n requiredLevel = eventsLevels[eventType];\n }\n return powerLevel >= requiredLevel;\n }\n\n /**\n * Returns true if the given user ID has permission to trigger notification\n * of type `notifLevelKey`\n * @param notifLevelKey - The level of notification to test (eg. 'room')\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID has permission to trigger a\n * notification of this type.\n */\n public mayTriggerNotifOfType(notifLevelKey: string, userId: string): boolean {\n const member = this.getMember(userId);\n if (!member) {\n return false;\n }\n\n const powerLevelsEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n\n let notifLevel = 50;\n if (\n powerLevelsEvent &&\n powerLevelsEvent.getContent() &&\n powerLevelsEvent.getContent().notifications &&\n isNumber(powerLevelsEvent.getContent().notifications[notifLevelKey])\n ) {\n notifLevel = powerLevelsEvent.getContent().notifications[notifLevelKey];\n }\n\n return member.powerLevel >= notifLevel;\n }\n\n /**\n * Returns the join rule based on the m.room.join_rule state event, defaulting to `invite`.\n * @returns the join_rule applied to this room\n */\n public getJoinRule(): JoinRule {\n const joinRuleEvent = this.getStateEvents(EventType.RoomJoinRules, \"\");\n const joinRuleContent: Partial<RoomJoinRulesEventContent> = joinRuleEvent?.getContent() ?? {};\n return joinRuleContent[\"join_rule\"] || JoinRule.Invite;\n }\n\n /**\n * Returns the history visibility based on the m.room.history_visibility state event, defaulting to `shared`.\n * @returns the history_visibility applied to this room\n */\n public getHistoryVisibility(): HistoryVisibility {\n const historyVisibilityEvent = this.getStateEvents(EventType.RoomHistoryVisibility, \"\");\n const historyVisibilityContent = historyVisibilityEvent?.getContent() ?? {};\n return historyVisibilityContent[\"history_visibility\"] || HistoryVisibility.Shared;\n }\n\n /**\n * Returns the guest access based on the m.room.guest_access state event, defaulting to `shared`.\n * @returns the guest_access applied to this room\n */\n public getGuestAccess(): GuestAccess {\n const guestAccessEvent = this.getStateEvents(EventType.RoomGuestAccess, \"\");\n const guestAccessContent = guestAccessEvent?.getContent() ?? {};\n return guestAccessContent[\"guest_access\"] || GuestAccess.Forbidden;\n }\n\n /**\n * Find the predecessor room based on this room state.\n *\n * @param msc3946ProcessDynamicPredecessor - if true, look for an\n * m.room.predecessor state event and use it if found (MSC3946).\n * @returns null if this room has no predecessor. Otherwise, returns\n * the roomId, last eventId and viaServers of the predecessor room.\n *\n * If msc3946ProcessDynamicPredecessor is true, use m.predecessor events\n * as well as m.room.create events to find predecessors.\n *\n * Note: if an m.predecessor event is used, eventId may be undefined\n * since last_known_event_id is optional.\n *\n * Note: viaServers may be undefined, and will definitely be undefined if\n * this predecessor comes from a RoomCreate event (rather than a\n * RoomPredecessor, which has the optional via_servers property).\n */\n public findPredecessor(\n msc3946ProcessDynamicPredecessor = false,\n ): { roomId: string; eventId?: string; viaServers?: string[] } | null {\n // Note: the tests for this function are against Room.findPredecessor,\n // which just calls through to here.\n\n if (msc3946ProcessDynamicPredecessor) {\n const predecessorEvent = this.getStateEvents(EventType.RoomPredecessor, \"\");\n if (predecessorEvent) {\n const content = predecessorEvent.getContent<{\n predecessor_room_id: string;\n last_known_event_id?: string;\n via_servers?: string[];\n }>();\n const roomId = content.predecessor_room_id;\n let eventId = content.last_known_event_id;\n if (typeof eventId !== \"string\") {\n eventId = undefined;\n }\n let viaServers = content.via_servers;\n if (!Array.isArray(viaServers)) {\n viaServers = undefined;\n }\n if (typeof roomId === \"string\") {\n return { roomId, eventId, viaServers };\n }\n }\n }\n\n const createEvent = this.getStateEvents(EventType.RoomCreate, \"\");\n if (createEvent) {\n const predecessor = createEvent.getContent<{\n predecessor?: Partial<{\n room_id: string;\n event_id: string;\n }>;\n }>()[\"predecessor\"];\n if (predecessor) {\n const roomId = predecessor[\"room_id\"];\n if (typeof roomId === \"string\") {\n let eventId = predecessor[\"event_id\"];\n if (typeof eventId !== \"string\" || eventId === \"\") {\n eventId = undefined;\n }\n return { roomId, eventId };\n }\n }\n }\n return null;\n }\n\n private updateThirdPartyTokenCache(memberEvent: MatrixEvent): void {\n if (!memberEvent.getContent().third_party_invite) {\n return;\n }\n const token = (memberEvent.getContent().third_party_invite.signed || {}).token;\n if (!token) {\n return;\n }\n const threePidInvite = this.getStateEvents(EventType.RoomThirdPartyInvite, token);\n if (!threePidInvite) {\n return;\n }\n this.tokenToInvite[token] = memberEvent;\n }\n\n private updateDisplayNameCache(userId: string, displayName: string): void {\n const oldName = this.userIdsToDisplayNames[userId];\n delete this.userIdsToDisplayNames[userId];\n if (oldName) {\n // Remove the old name from the cache.\n // We clobber the user_id > name lookup but the name -> [user_id] lookup\n // means we need to remove that user ID from that array rather than nuking\n // the lot.\n const strippedOldName = removeHiddenChars(oldName);\n\n const existingUserIds = this.displayNameToUserIds.get(strippedOldName);\n if (existingUserIds) {\n // remove this user ID from this array\n const filteredUserIDs = existingUserIds.filter((id) => id !== userId);\n this.displayNameToUserIds.set(strippedOldName, filteredUserIDs);\n }\n }\n\n this.userIdsToDisplayNames[userId] = displayName;\n\n const strippedDisplayname = displayName && removeHiddenChars(displayName);\n // an empty stripped displayname (undefined/'') will be set to MXID in room-member.js\n if (strippedDisplayname) {\n const arr = this.displayNameToUserIds.get(strippedDisplayname) ?? [];\n arr.push(userId);\n this.displayNameToUserIds.set(strippedDisplayname, arr);\n }\n }\n}\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,QAAQ,EAAEC,iBAAiB,QAAQ,aAAa;AACzD,SAASC,SAAS,EAAEC,uBAAuB,QAAQ,oBAAoB;AACvE,SAA8BC,gBAAgB,QAAQ,YAAY;AAElE,SAASC,WAAW,EAAEC,iBAAiB,EAAEC,QAAQ,QAAQ,uBAAuB;AAChF,SAASC,iBAAiB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ACmN,mBAAmB,CAAC,cAAAC,sBAAA,cAAAA,sBAAA,GAAI,EAAE;MACpEC,GAAG,CAACC,IAAI,CAACpO,MAAM,CAAC;MAChB,IAAI,CAACkJ,oBAAoB,CAAChD,GAAG,CAAC+H,mBAAmB,EAAEE,GAAG,CAAC;IAC3D;EACJ;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"room-state.js","names":["RoomMember","logger","isNumber","removeHiddenChars","EventType","UNSTABLE_MSC2716_MARKER","GuestAccess","HistoryVisibility","JoinRule","TypedEventEmitter","Beacon","BeaconEvent","getBeaconInfoIdentifier","TypedReEmitter","M_BEACON","M_BEACON_INFO","KnownMembership","OobStatus","RoomStateEvent","RoomState","constructor","roomId","oobMemberFlags","arguments","length","undefined","status","NotStarted","_defineProperty","Map","updateModifiedTime","getJoinedMemberCount","summaryJoinedMemberCount","joinedMemberCount","getMembers","reduce","count","m","membership","Join","setJoinedMemberCount","getInvitedMemberCount","summaryInvitedMemberCount","invitedMemberCount","Invite","setInvitedMemberCount","Object","values","members","getMembersExcept","excludedIds","filter","includes","userId","getMember","getSentinelMember","sentinel","sentinels","member","events","setMembershipEvent","getStateEvents","eventType","stateKey","has","Array","from","get","event","hasLiveBeacons","_this$liveBeaconIds","liveBeaconIds","_liveBeaconIds","clone","copy","forEach","eventsByStateKey","setStateEvents","Finished","isOutOfBand","_copy$getMember","markOutOfBand","setUnknownStateEvents","unknownStateEvents","getType","getStateKey","stateEvents","markerFoundOptions","getRoomId","isState","matches","setBeacon","lastStateEvent","getStateEventMatching","setStateEvent","_event$getContent$dis","updateDisplayNameCache","getContent","displayname","updateThirdPartyTokenCache","emit","Events","onBeaconLivenessChange","Leave","Ban","avatar_url","getPrevContent","getOrCreateMember","updateMember","Members","RoomPowerLevels","oldLastModified","getLastModifiedTime","setPowerLevelEvent","Marker","Update","processBeaconEvents","matrixClient","_this","_asyncToGenerator","beacons","size","beaconByEventIdDict","dict","beacon","beaconInfoId","processBeaconRelation","beaconInfoEventId","addLocations","_event$getRelation","relatedToEventId","getRelation","event_id","isEncrypted","_unused","NewMember","set","beaconIdentifier","isRedacted","_event$getRedactionEv","getRedactionEvent","redacts","destroy","delete","update","reEmitter","reEmit","New","Destroy","LivenessChange","on","bind","identifier","isLive","map","BeaconLiveness","_this$events$get$get","_this$events$get","pwrLvlEvent","needsOutOfBandMembers","outOfBandMembersReady","markOutOfBandMembersStarted","InProgress","markOutOfBandMembersFailed","clearOutOfBandMembers","keys","log","concat","setOutOfBandMembers","e","setOutOfBandMember","stateEvent","existingMember","name","setTypingEvent","getInviteForThreePidToken","token","tokenToInvite","modified","Date","now","getUserIdsWithDisplayName","displayName","_this$displayNameToUs","displayNameToUserIds","maySendRedactionForEvent","mxEvent","canRedact","maySendEvent","RoomRedaction","getSender","hasSufficientPowerLevelFor","powerLevel","action","powerLevelsEvent","powerLevels","requiredLevel","maySendMessage","maySendEventOfType","RoomMessage","mayClientSendStateEvent","stateEventType","cli","isGuest","credentials","maySendStateEvent","state","eventsLevels","stateDefault","eventsDefault","Number","isSafeInteger","state_default","userPowerLevel","users","users_default","events_default","mayTriggerNotifOfType","notifLevelKey","notifLevel","notifications","getJoinRule","_joinRuleEvent$getCon","joinRuleEvent","RoomJoinRules","joinRuleContent","getHistoryVisibility","_historyVisibilityEve","historyVisibilityEvent","RoomHistoryVisibility","historyVisibilityContent","Shared","getGuestAccess","_guestAccessEvent$get","guestAccessEvent","RoomGuestAccess","guestAccessContent","Forbidden","findPredecessor","msc3946ProcessDynamicPredecessor","predecessorEvent","RoomPredecessor","content","predecessor_room_id","eventId","last_known_event_id","viaServers","via_servers","isArray","createEvent","RoomCreate","predecessor","memberEvent","third_party_invite","signed","threePidInvite","RoomThirdPartyInvite","oldName","userIdsToDisplayNames","strippedOldName","existingUserIds","filteredUserIDs","id","strippedDisplayname","_this$displayNameToUs2","arr","push"],"sources":["../../src/models/room-state.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\nimport { RoomMember } from \"./room-member.ts\";\nimport { logger } from \"../logger.ts\";\nimport { isNumber, removeHiddenChars } from \"../utils.ts\";\nimport { EventType, UNSTABLE_MSC2716_MARKER } from \"../@types/event.ts\";\nimport { IEvent, MatrixEvent } from \"./event.ts\";\nimport { MatrixClient } from \"../client.ts\";\nimport { GuestAccess, HistoryVisibility, JoinRule } from \"../@types/partials.ts\";\nimport { TypedEventEmitter } from \"./typed-event-emitter.ts\";\nimport { Beacon, BeaconEvent, BeaconEventHandlerMap, getBeaconInfoIdentifier, BeaconIdentifier } from \"./beacon.ts\";\nimport { TypedReEmitter } from \"../ReEmitter.ts\";\nimport { M_BEACON, M_BEACON_INFO } from \"../@types/beacon.ts\";\nimport { KnownMembership } from \"../@types/membership.ts\";\nimport { RoomJoinRulesEventContent } from \"../@types/state_events.ts\";\n\nexport interface IMarkerFoundOptions {\n /** Whether the timeline was empty before the marker event arrived in the\n * room. This could be happen in a variety of cases:\n * 1. From the initial sync\n * 2. It's the first state we're seeing after joining the room\n * 3. Or whether it's coming from `syncFromCache`\n *\n * A marker event refers to `UNSTABLE_MSC2716_MARKER` and indicates that\n * history was imported somewhere back in time. It specifically points to an\n * MSC2716 insertion event where the history was imported at. Marker events\n * are sent as state events so they are easily discoverable by clients and\n * homeservers and don't get lost in timeline gaps.\n */\n timelineWasEmpty?: boolean;\n}\n\n// possible statuses for out-of-band member loading\nenum OobStatus {\n NotStarted,\n InProgress,\n Finished,\n}\n\nexport interface IPowerLevelsContent {\n users?: Record<string, number>;\n events?: Record<string, number>;\n notifications?: Partial<Record<\"room\", number>>;\n // eslint-disable-next-line camelcase\n users_default?: number;\n // eslint-disable-next-line camelcase\n events_default?: number;\n // eslint-disable-next-line camelcase\n state_default?: number;\n ban?: number;\n invite?: number;\n kick?: number;\n redact?: number;\n}\n\nexport enum RoomStateEvent {\n Events = \"RoomState.events\",\n Members = \"RoomState.members\",\n NewMember = \"RoomState.newMember\",\n Update = \"RoomState.update\", // signals batches of updates without specificity\n BeaconLiveness = \"RoomState.BeaconLiveness\",\n Marker = \"RoomState.Marker\",\n}\n\nexport type RoomStateEventHandlerMap = {\n /**\n * Fires whenever the event dictionary in room state is updated.\n * This does not guarantee that any related objects (like RoomMember) have been updated.\n * Use RoomStateEvent.Update for that.\n * @param event - The matrix event which caused this event to fire.\n * @param state - The room state whose RoomState.events dictionary\n * was updated.\n * @param prevEvent - The event being replaced by the new state, if\n * known. Note that this can differ from `getPrevContent()` on the new state event\n * as this is the store's view of the last state, not the previous state provided\n * by the server.\n * @example\n * ```\n * matrixClient.on(\"RoomState.events\", function(event, state, prevEvent){\n * var newStateEvent = event;\n * });\n * ```\n */\n [RoomStateEvent.Events]: (event: MatrixEvent, state: RoomState, prevEvent: MatrixEvent | null) => void;\n /**\n * Fires whenever a member in the members dictionary is updated in any way.\n * @param event - The matrix event which caused this event to fire.\n * @param state - The room state whose RoomState.members dictionary\n * was updated.\n * @param member - The room member that was updated.\n * @example\n * ```\n * matrixClient.on(\"RoomState.members\", function(event, state, member){\n * var newMembershipState = member.membership;\n * });\n * ```\n */\n [RoomStateEvent.Members]: (event: MatrixEvent, state: RoomState, member: RoomMember) => void;\n /**\n * Fires whenever a member is added to the members dictionary. The RoomMember\n * will not be fully populated yet (e.g. no membership state) but will already\n * be available in the members dictionary.\n * @param event - The matrix event which caused this event to fire.\n * @param state - The room state whose RoomState.members dictionary\n * was updated with a new entry.\n * @param member - The room member that was added.\n * @example\n * ```\n * matrixClient.on(\"RoomState.newMember\", function(event, state, member){\n * // add event listeners on 'member'\n * });\n * ```\n */\n [RoomStateEvent.NewMember]: (event: MatrixEvent, state: RoomState, member: RoomMember) => void;\n [RoomStateEvent.Update]: (state: RoomState) => void;\n [RoomStateEvent.BeaconLiveness]: (state: RoomState, hasLiveBeacons: boolean) => void;\n [RoomStateEvent.Marker]: (event: MatrixEvent, setStateOptions?: IMarkerFoundOptions) => void;\n [BeaconEvent.New]: (event: MatrixEvent, beacon: Beacon) => void;\n};\n\ntype EmittedEvents = RoomStateEvent | BeaconEvent;\ntype EventHandlerMap = RoomStateEventHandlerMap & BeaconEventHandlerMap;\n\ntype KeysMatching<T, V> = { [K in keyof T]-?: T[K] extends V ? K : never }[keyof T];\n\nexport class RoomState extends TypedEventEmitter<EmittedEvents, EventHandlerMap> {\n public readonly reEmitter = new TypedReEmitter<EmittedEvents, EventHandlerMap>(this);\n private sentinels: Record<string, RoomMember> = {}; // userId: RoomMember\n // stores fuzzy matches to a list of userIDs (applies utils.removeHiddenChars to keys)\n private displayNameToUserIds = new Map<string, string[]>();\n private userIdsToDisplayNames: Record<string, string> = {};\n private tokenToInvite: Record<string, MatrixEvent> = {}; // 3pid invite state_key to m.room.member invite\n private joinedMemberCount: number | null = null; // cache of the number of joined members\n // joined members count from summary api\n // once set, we know the server supports the summary api\n // and we should only trust that\n // we could also only trust that before OOB members\n // are loaded but doesn't seem worth the hassle atm\n private summaryJoinedMemberCount: number | null = null;\n // same for invited member count\n private invitedMemberCount: number | null = null;\n private summaryInvitedMemberCount: number | null = null;\n private modified = -1;\n\n // XXX: Should be read-only\n // The room member dictionary, keyed on the user's ID.\n public members: Record<string, RoomMember> = {}; // userId: RoomMember\n // The state events dictionary, keyed on the event type and then the state_key value.\n public events = new Map<string, Map<string, MatrixEvent>>(); // Map<eventType, Map<stateKey, MatrixEvent>>\n // The pagination token for this state.\n public paginationToken: string | null = null;\n\n public readonly beacons = new Map<BeaconIdentifier, Beacon>();\n private _liveBeaconIds: BeaconIdentifier[] = [];\n\n /**\n * Construct room state.\n *\n * Room State represents the state of the room at a given point.\n * It can be mutated by adding state events to it.\n * There are two types of room member associated with a state event:\n * normal member objects (accessed via getMember/getMembers) which mutate\n * with the state to represent the current state of that room/user, e.g.\n * the object returned by `getMember('@bob:example.com')` will mutate to\n * get a different display name if Bob later changes his display name\n * in the room.\n * There are also 'sentinel' members (accessed via getSentinelMember).\n * These also represent the state of room members at the point in time\n * represented by the RoomState object, but unlike objects from getMember,\n * sentinel objects will always represent the room state as at the time\n * getSentinelMember was called, so if Bob subsequently changes his display\n * name, a room member object previously acquired with getSentinelMember\n * will still have his old display name. Calling getSentinelMember again\n * after the display name change will return a new RoomMember object\n * with Bob's new display name.\n *\n * @param roomId - Optional. The ID of the room which has this state.\n * If none is specified it just tracks paginationTokens, useful for notifTimelineSet\n * @param oobMemberFlags - Optional. The state of loading out of bound members.\n * As the timeline might get reset while they are loading, this state needs to be inherited\n * and shared when the room state is cloned for the new timeline.\n * This should only be passed from clone.\n */\n\n public constructor(\n public readonly roomId: string,\n private oobMemberFlags = { status: OobStatus.NotStarted },\n ) {\n super();\n this.updateModifiedTime();\n }\n\n /**\n * Returns the number of joined members in this room\n * This method caches the result.\n * @returns The number of members in this room whose membership is 'join'\n */\n public getJoinedMemberCount(): number {\n if (this.summaryJoinedMemberCount !== null) {\n return this.summaryJoinedMemberCount;\n }\n if (this.joinedMemberCount === null) {\n this.joinedMemberCount = this.getMembers().reduce((count, m) => {\n return m.membership === KnownMembership.Join ? count + 1 : count;\n }, 0);\n }\n return this.joinedMemberCount;\n }\n\n /**\n * Set the joined member count explicitly (like from summary part of the sync response)\n * @param count - the amount of joined members\n */\n public setJoinedMemberCount(count: number): void {\n this.summaryJoinedMemberCount = count;\n }\n\n /**\n * Returns the number of invited members in this room\n * @returns The number of members in this room whose membership is 'invite'\n */\n public getInvitedMemberCount(): number {\n if (this.summaryInvitedMemberCount !== null) {\n return this.summaryInvitedMemberCount;\n }\n if (this.invitedMemberCount === null) {\n this.invitedMemberCount = this.getMembers().reduce((count, m) => {\n return m.membership === KnownMembership.Invite ? count + 1 : count;\n }, 0);\n }\n return this.invitedMemberCount;\n }\n\n /**\n * Set the amount of invited members in this room\n * @param count - the amount of invited members\n */\n public setInvitedMemberCount(count: number): void {\n this.summaryInvitedMemberCount = count;\n }\n\n /**\n * Get all RoomMembers in this room.\n * @returns A list of RoomMembers.\n */\n public getMembers(): RoomMember[] {\n return Object.values(this.members);\n }\n\n /**\n * Get all RoomMembers in this room, excluding the user IDs provided.\n * @param excludedIds - The user IDs to exclude.\n * @returns A list of RoomMembers.\n */\n public getMembersExcept(excludedIds: string[]): RoomMember[] {\n return this.getMembers().filter((m) => !excludedIds.includes(m.userId));\n }\n\n /**\n * Get a room member by their user ID.\n * @param userId - The room member's user ID.\n * @returns The member or null if they do not exist.\n */\n public getMember(userId: string): RoomMember | null {\n return this.members[userId] || null;\n }\n\n /**\n * Get a room member whose properties will not change with this room state. You\n * typically want this if you want to attach a RoomMember to a MatrixEvent which\n * may no longer be represented correctly by Room.currentState or Room.oldState.\n * The term 'sentinel' refers to the fact that this RoomMember is an unchanging\n * guardian for state at this particular point in time.\n * @param userId - The room member's user ID.\n * @returns The member or null if they do not exist.\n */\n public getSentinelMember(userId: string): RoomMember | null {\n if (!userId) return null;\n let sentinel = this.sentinels[userId];\n\n if (sentinel === undefined) {\n sentinel = new RoomMember(this.roomId, userId);\n const member = this.members[userId];\n if (member?.events.member) {\n sentinel.setMembershipEvent(member.events.member, this);\n }\n this.sentinels[userId] = sentinel;\n }\n return sentinel;\n }\n\n /**\n * Get state events from the state of the room.\n * @param eventType - The event type of the state event.\n * @returns A list of events\n */\n public getStateEvents(eventType: EventType | string): MatrixEvent[];\n /**\n * Get state events from the state of the room.\n * @param eventType - The event type of the state event.\n * @param stateKey - The state_key of the state event.\n * @returns A single event (or null if no match found).\n */\n public getStateEvents(eventType: EventType | string, stateKey: string): MatrixEvent | null;\n public getStateEvents(eventType: EventType | string, stateKey?: string): MatrixEvent[] | MatrixEvent | null {\n if (!this.events.has(eventType)) {\n // no match\n return stateKey === undefined ? [] : null;\n }\n if (stateKey === undefined) {\n // return all values\n return Array.from(this.events.get(eventType)!.values());\n }\n const event = this.events.get(eventType)!.get(stateKey);\n return event ? event : null;\n }\n\n public get hasLiveBeacons(): boolean {\n return !!this.liveBeaconIds?.length;\n }\n\n public get liveBeaconIds(): BeaconIdentifier[] {\n return this._liveBeaconIds;\n }\n\n /**\n * Creates a copy of this room state so that mutations to either won't affect the other.\n * @returns the copy of the room state\n */\n public clone(): RoomState {\n const copy = new RoomState(this.roomId, this.oobMemberFlags);\n\n // Ugly hack: because setStateEvents will mark\n // members as susperseding future out of bound members\n // if loading is in progress (through oobMemberFlags)\n // since these are not new members, we're merely copying them\n // set the status to not started\n // after copying, we set back the status\n const status = this.oobMemberFlags.status;\n this.oobMemberFlags.status = OobStatus.NotStarted;\n\n Array.from(this.events.values()).forEach((eventsByStateKey) => {\n copy.setStateEvents(Array.from(eventsByStateKey.values()));\n });\n\n // Ugly hack: see above\n this.oobMemberFlags.status = status;\n\n if (this.summaryInvitedMemberCount !== null) {\n copy.setInvitedMemberCount(this.getInvitedMemberCount());\n }\n if (this.summaryJoinedMemberCount !== null) {\n copy.setJoinedMemberCount(this.getJoinedMemberCount());\n }\n\n // copy out of band flags if needed\n if (this.oobMemberFlags.status == OobStatus.Finished) {\n // copy markOutOfBand flags\n this.getMembers().forEach((member) => {\n if (member.isOutOfBand()) {\n copy.getMember(member.userId)?.markOutOfBand();\n }\n });\n }\n\n return copy;\n }\n\n /**\n * Add previously unknown state events.\n * When lazy loading members while back-paginating,\n * the relevant room state for the timeline chunk at the end\n * of the chunk can be set with this method.\n * @param events - state events to prepend\n */\n public setUnknownStateEvents(events: MatrixEvent[]): void {\n const unknownStateEvents = events.filter((event) => {\n return !this.events.has(event.getType()) || !this.events.get(event.getType())!.has(event.getStateKey()!);\n });\n\n this.setStateEvents(unknownStateEvents);\n }\n\n /**\n * Add an array of one or more state MatrixEvents, overwriting any existing\n * state with the same `{type, stateKey}` tuple. Will fire \"RoomState.events\"\n * for every event added. May fire \"RoomState.members\" if there are\n * `m.room.member` events. May fire \"RoomStateEvent.Marker\" if there are\n * `UNSTABLE_MSC2716_MARKER` events.\n * @param stateEvents - a list of state events for this room.\n *\n * @remarks\n * Fires {@link RoomStateEvent.Members}\n * Fires {@link RoomStateEvent.NewMember}\n * Fires {@link RoomStateEvent.Events}\n * Fires {@link RoomStateEvent.Marker}\n */\n public setStateEvents(stateEvents: MatrixEvent[], markerFoundOptions?: IMarkerFoundOptions): void {\n this.updateModifiedTime();\n\n // update the core event dict\n stateEvents.forEach((event) => {\n if (event.getRoomId() !== this.roomId || !event.isState()) return;\n\n if (M_BEACON_INFO.matches(event.getType())) {\n this.setBeacon(event);\n }\n\n const lastStateEvent = this.getStateEventMatching(event);\n this.setStateEvent(event);\n if (event.getType() === EventType.RoomMember) {\n this.updateDisplayNameCache(event.getStateKey()!, event.getContent().displayname ?? \"\");\n this.updateThirdPartyTokenCache(event);\n }\n this.emit(RoomStateEvent.Events, event, this, lastStateEvent);\n });\n\n this.onBeaconLivenessChange();\n // update higher level data structures. This needs to be done AFTER the\n // core event dict as these structures may depend on other state events in\n // the given array (e.g. disambiguating display names in one go to do both\n // clashing names rather than progressively which only catches 1 of them).\n stateEvents.forEach((event) => {\n if (event.getRoomId() !== this.roomId || !event.isState()) return;\n\n if (event.getType() === EventType.RoomMember) {\n const userId = event.getStateKey()!;\n\n // leave events apparently elide the displayname or avatar_url,\n // so let's fake one up so that we don't leak user ids\n // into the timeline\n if (\n event.getContent().membership === KnownMembership.Leave ||\n event.getContent().membership === KnownMembership.Ban\n ) {\n event.getContent().avatar_url = event.getContent().avatar_url || event.getPrevContent().avatar_url;\n event.getContent().displayname =\n event.getContent().displayname || event.getPrevContent().displayname;\n }\n\n const member = this.getOrCreateMember(userId, event);\n member.setMembershipEvent(event, this);\n this.updateMember(member);\n this.emit(RoomStateEvent.Members, event, this, member);\n } else if (event.getType() === EventType.RoomPowerLevels) {\n // events with unknown state keys should be ignored\n // and should not aggregate onto members power levels\n if (event.getStateKey() !== \"\") {\n return;\n }\n const members = Object.values(this.members);\n members.forEach((member) => {\n // We only propagate `RoomState.members` event if the\n // power levels has been changed\n // large room suffer from large re-rendering especially when not needed\n const oldLastModified = member.getLastModifiedTime();\n member.setPowerLevelEvent(event);\n if (oldLastModified !== member.getLastModifiedTime()) {\n this.emit(RoomStateEvent.Members, event, this, member);\n }\n });\n\n // assume all our sentinels are now out-of-date\n this.sentinels = {};\n } else if (UNSTABLE_MSC2716_MARKER.matches(event.getType())) {\n this.emit(RoomStateEvent.Marker, event, markerFoundOptions);\n }\n });\n\n this.emit(RoomStateEvent.Update, this);\n }\n\n public async processBeaconEvents(events: MatrixEvent[], matrixClient: MatrixClient): Promise<void> {\n if (\n !events.length ||\n // discard locations if we have no beacons\n !this.beacons.size\n ) {\n return;\n }\n\n const beaconByEventIdDict = [...this.beacons.values()].reduce<Record<string, Beacon>>((dict, beacon) => {\n dict[beacon.beaconInfoId] = beacon;\n return dict;\n }, {});\n\n const processBeaconRelation = (beaconInfoEventId: string, event: MatrixEvent): void => {\n if (!M_BEACON.matches(event.getType())) {\n return;\n }\n\n const beacon = beaconByEventIdDict[beaconInfoEventId];\n\n if (beacon) {\n beacon.addLocations([event]);\n }\n };\n\n for (const event of events) {\n const relatedToEventId = event.getRelation()?.event_id;\n // not related to a beacon we know about; discard\n if (!relatedToEventId || !beaconByEventIdDict[relatedToEventId]) return;\n if (!M_BEACON.matches(event.getType()) && !event.isEncrypted()) return;\n\n try {\n processBeaconRelation(relatedToEventId, event);\n } catch {\n //\n }\n }\n }\n\n /**\n * Looks up a member by the given userId, and if it doesn't exist,\n * create it and emit the `RoomState.newMember` event.\n * This method makes sure the member is added to the members dictionary\n * before emitting, as this is done from setStateEvents and setOutOfBandMember.\n * @param userId - the id of the user to look up\n * @param event - the membership event for the (new) member. Used to emit.\n * @returns the member, existing or newly created.\n *\n * @remarks\n * Fires {@link RoomStateEvent.NewMember}\n */\n private getOrCreateMember(userId: string, event: MatrixEvent): RoomMember {\n let member = this.members[userId];\n if (!member) {\n member = new RoomMember(this.roomId, userId);\n // add member to members before emitting any events,\n // as event handlers often lookup the member\n this.members[userId] = member;\n this.emit(RoomStateEvent.NewMember, event, this, member);\n }\n return member;\n }\n\n private setStateEvent(event: MatrixEvent): void {\n if (!this.events.has(event.getType())) {\n this.events.set(event.getType(), new Map());\n }\n this.events.get(event.getType())!.set(event.getStateKey()!, event);\n }\n\n /**\n * @experimental\n */\n private setBeacon(event: MatrixEvent): void {\n const beaconIdentifier = getBeaconInfoIdentifier(event);\n\n if (this.beacons.has(beaconIdentifier)) {\n const beacon = this.beacons.get(beaconIdentifier)!;\n\n if (event.isRedacted()) {\n if (beacon.beaconInfoId === (<IEvent>event.getRedactionEvent())?.redacts) {\n beacon.destroy();\n this.beacons.delete(beaconIdentifier);\n }\n return;\n }\n\n return beacon.update(event);\n }\n\n if (event.isRedacted()) {\n return;\n }\n\n const beacon = new Beacon(event);\n\n this.reEmitter.reEmit<BeaconEvent, BeaconEvent>(beacon, [\n BeaconEvent.New,\n BeaconEvent.Update,\n BeaconEvent.Destroy,\n BeaconEvent.LivenessChange,\n ]);\n\n this.emit(BeaconEvent.New, event, beacon);\n beacon.on(BeaconEvent.LivenessChange, this.onBeaconLivenessChange.bind(this));\n beacon.on(BeaconEvent.Destroy, this.onBeaconLivenessChange.bind(this));\n\n this.beacons.set(beacon.identifier, beacon);\n }\n\n /**\n * @experimental\n * Check liveness of room beacons\n * emit RoomStateEvent.BeaconLiveness event\n */\n private onBeaconLivenessChange(): void {\n this._liveBeaconIds = Array.from(this.beacons.values())\n .filter((beacon) => beacon.isLive)\n .map((beacon) => beacon.identifier);\n\n this.emit(RoomStateEvent.BeaconLiveness, this, this.hasLiveBeacons);\n }\n\n private getStateEventMatching(event: MatrixEvent): MatrixEvent | null {\n return this.events.get(event.getType())?.get(event.getStateKey()!) ?? null;\n }\n\n private updateMember(member: RoomMember): void {\n // this member may have a power level already, so set it.\n const pwrLvlEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n if (pwrLvlEvent) {\n member.setPowerLevelEvent(pwrLvlEvent);\n }\n\n // blow away the sentinel which is now outdated\n delete this.sentinels[member.userId];\n\n this.members[member.userId] = member;\n this.joinedMemberCount = null;\n this.invitedMemberCount = null;\n }\n\n /**\n * Get the out-of-band members loading state, whether loading is needed or not.\n * Note that loading might be in progress and hence isn't needed.\n * @returns whether or not the members of this room need to be loaded\n */\n public needsOutOfBandMembers(): boolean {\n return this.oobMemberFlags.status === OobStatus.NotStarted;\n }\n\n /**\n * Check if loading of out-of-band-members has completed\n *\n * @returns true if the full membership list of this room has been loaded. False if it is not started or is in\n * progress.\n */\n public outOfBandMembersReady(): boolean {\n return this.oobMemberFlags.status === OobStatus.Finished;\n }\n\n /**\n * Mark this room state as waiting for out-of-band members,\n * ensuring it doesn't ask for them to be requested again\n * through needsOutOfBandMembers\n */\n public markOutOfBandMembersStarted(): void {\n if (this.oobMemberFlags.status !== OobStatus.NotStarted) {\n return;\n }\n this.oobMemberFlags.status = OobStatus.InProgress;\n }\n\n /**\n * Mark this room state as having failed to fetch out-of-band members\n */\n public markOutOfBandMembersFailed(): void {\n if (this.oobMemberFlags.status !== OobStatus.InProgress) {\n return;\n }\n this.oobMemberFlags.status = OobStatus.NotStarted;\n }\n\n /**\n * Clears the loaded out-of-band members\n */\n public clearOutOfBandMembers(): void {\n let count = 0;\n Object.keys(this.members).forEach((userId) => {\n const member = this.members[userId];\n if (member.isOutOfBand()) {\n ++count;\n delete this.members[userId];\n }\n });\n logger.log(`LL: RoomState removed ${count} members...`);\n this.oobMemberFlags.status = OobStatus.NotStarted;\n }\n\n /**\n * Sets the loaded out-of-band members.\n * @param stateEvents - array of membership state events\n */\n public setOutOfBandMembers(stateEvents: MatrixEvent[]): void {\n logger.log(`LL: RoomState about to set ${stateEvents.length} OOB members ...`);\n if (this.oobMemberFlags.status !== OobStatus.InProgress) {\n return;\n }\n logger.log(`LL: RoomState put in finished state ...`);\n this.oobMemberFlags.status = OobStatus.Finished;\n stateEvents.forEach((e) => this.setOutOfBandMember(e));\n this.emit(RoomStateEvent.Update, this);\n }\n\n /**\n * Sets a single out of band member, used by both setOutOfBandMembers and clone\n * @param stateEvent - membership state event\n */\n private setOutOfBandMember(stateEvent: MatrixEvent): void {\n if (stateEvent.getType() !== EventType.RoomMember) {\n return;\n }\n const userId = stateEvent.getStateKey()!;\n const existingMember = this.getMember(userId);\n // never replace members received as part of the sync\n if (existingMember && !existingMember.isOutOfBand()) {\n return;\n }\n\n const member = this.getOrCreateMember(userId, stateEvent);\n member.setMembershipEvent(stateEvent, this);\n // needed to know which members need to be stored seperately\n // as they are not part of the sync accumulator\n // this is cleared by setMembershipEvent so when it's updated through /sync\n member.markOutOfBand();\n\n this.updateDisplayNameCache(member.userId, member.name);\n\n this.setStateEvent(stateEvent);\n this.updateMember(member);\n this.emit(RoomStateEvent.Members, stateEvent, this, member);\n }\n\n /**\n * Set the current typing event for this room.\n * @param event - The typing event\n */\n public setTypingEvent(event: MatrixEvent): void {\n Object.values(this.members).forEach(function (member) {\n member.setTypingEvent(event);\n });\n }\n\n /**\n * Get the m.room.member event which has the given third party invite token.\n *\n * @param token - The token\n * @returns The m.room.member event or null\n */\n public getInviteForThreePidToken(token: string): MatrixEvent | null {\n return this.tokenToInvite[token] || null;\n }\n\n /**\n * Update the last modified time to the current time.\n */\n private updateModifiedTime(): void {\n this.modified = Date.now();\n }\n\n /**\n * Get the timestamp when this room state was last updated. This timestamp is\n * updated when this object has received new state events.\n * @returns The timestamp\n */\n public getLastModifiedTime(): number {\n return this.modified;\n }\n\n /**\n * Get user IDs with the specified or similar display names.\n * @param displayName - The display name to get user IDs from.\n * @returns An array of user IDs or an empty array.\n */\n public getUserIdsWithDisplayName(displayName: string): string[] {\n return this.displayNameToUserIds.get(removeHiddenChars(displayName)) ?? [];\n }\n\n /**\n * Returns true if userId is in room, event is not redacted and either sender of\n * mxEvent or has power level sufficient to redact events other than their own.\n * @param mxEvent - The event to test permission for\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given used ID can redact given event\n */\n public maySendRedactionForEvent(mxEvent: MatrixEvent, userId: string): boolean {\n const member = this.getMember(userId);\n if (!member || member.membership === KnownMembership.Leave) return false;\n\n if (mxEvent.status || mxEvent.isRedacted()) return false;\n\n // The user may have been the sender, but they can't redact their own message\n // if redactions are blocked.\n const canRedact = this.maySendEvent(EventType.RoomRedaction, userId);\n\n if (!canRedact) return false;\n if (mxEvent.getSender() === userId) return true;\n\n return this.hasSufficientPowerLevelFor(\"redact\", member.powerLevel);\n }\n\n /**\n * Returns true if the given power level is sufficient for action\n * @param action - The type of power level to check\n * @param powerLevel - The power level of the member\n * @returns true if the given power level is sufficient\n */\n public hasSufficientPowerLevelFor(\n action: KeysMatching<Required<IPowerLevelsContent>, number>,\n powerLevel: number,\n ): boolean {\n const powerLevelsEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n\n let powerLevels: IPowerLevelsContent = {};\n if (powerLevelsEvent) {\n powerLevels = powerLevelsEvent.getContent();\n }\n\n let requiredLevel = 50;\n if (isNumber(powerLevels[action])) {\n requiredLevel = powerLevels[action]!;\n }\n\n return powerLevel >= requiredLevel;\n }\n\n /**\n * Short-form for maySendEvent('m.room.message', userId)\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID should be permitted to send\n * message events into the given room.\n */\n public maySendMessage(userId: string): boolean {\n return this.maySendEventOfType(EventType.RoomMessage, userId, false);\n }\n\n /**\n * Returns true if the given user ID has permission to send a normal\n * event of type `eventType` into this room.\n * @param eventType - The type of event to test\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID should be permitted to send\n * the given type of event into this room,\n * according to the room's state.\n */\n public maySendEvent(eventType: EventType | string, userId: string): boolean {\n return this.maySendEventOfType(eventType, userId, false);\n }\n\n /**\n * Returns true if the given MatrixClient has permission to send a state\n * event of type `stateEventType` into this room.\n * @param stateEventType - The type of state events to test\n * @param cli - The client to test permission for\n * @returns true if the given client should be permitted to send\n * the given type of state event into this room,\n * according to the room's state.\n */\n public mayClientSendStateEvent(stateEventType: EventType | string, cli: MatrixClient): boolean {\n if (cli.isGuest() || !cli.credentials.userId) {\n return false;\n }\n return this.maySendStateEvent(stateEventType, cli.credentials.userId);\n }\n\n /**\n * Returns true if the given user ID has permission to send a state\n * event of type `stateEventType` into this room.\n * @param stateEventType - The type of state events to test\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID should be permitted to send\n * the given type of state event into this room,\n * according to the room's state.\n */\n public maySendStateEvent(stateEventType: EventType | string, userId: string): boolean {\n return this.maySendEventOfType(stateEventType, userId, true);\n }\n\n /**\n * Returns true if the given user ID has permission to send a normal or state\n * event of type `eventType` into this room.\n * @param eventType - The type of event to test\n * @param userId - The user ID of the user to test permission for\n * @param state - If true, tests if the user may send a state\n event of this type. Otherwise tests whether\n they may send a regular event.\n * @returns true if the given user ID should be permitted to send\n * the given type of event into this room,\n * according to the room's state.\n */\n private maySendEventOfType(eventType: EventType | string, userId: string, state: boolean): boolean {\n const powerLevelsEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n\n let powerLevels: IPowerLevelsContent;\n let eventsLevels: Record<EventType | string, number> = {};\n\n let stateDefault = 0;\n let eventsDefault = 0;\n let powerLevel = 0;\n if (powerLevelsEvent) {\n powerLevels = powerLevelsEvent.getContent();\n eventsLevels = powerLevels.events || {};\n\n if (Number.isSafeInteger(powerLevels.state_default)) {\n stateDefault = powerLevels.state_default!;\n } else {\n stateDefault = 50;\n }\n\n const userPowerLevel = powerLevels.users && powerLevels.users[userId];\n if (Number.isSafeInteger(userPowerLevel)) {\n powerLevel = userPowerLevel!;\n } else if (Number.isSafeInteger(powerLevels.users_default)) {\n powerLevel = powerLevels.users_default!;\n }\n\n if (Number.isSafeInteger(powerLevels.events_default)) {\n eventsDefault = powerLevels.events_default!;\n }\n }\n\n let requiredLevel = state ? stateDefault : eventsDefault;\n if (Number.isSafeInteger(eventsLevels[eventType])) {\n requiredLevel = eventsLevels[eventType];\n }\n return powerLevel >= requiredLevel;\n }\n\n /**\n * Returns true if the given user ID has permission to trigger notification\n * of type `notifLevelKey`\n * @param notifLevelKey - The level of notification to test (eg. 'room')\n * @param userId - The user ID of the user to test permission for\n * @returns true if the given user ID has permission to trigger a\n * notification of this type.\n */\n public mayTriggerNotifOfType(notifLevelKey: string, userId: string): boolean {\n const member = this.getMember(userId);\n if (!member) {\n return false;\n }\n\n const powerLevelsEvent = this.getStateEvents(EventType.RoomPowerLevels, \"\");\n\n let notifLevel = 50;\n if (\n powerLevelsEvent &&\n powerLevelsEvent.getContent() &&\n powerLevelsEvent.getContent().notifications &&\n isNumber(powerLevelsEvent.getContent().notifications[notifLevelKey])\n ) {\n notifLevel = powerLevelsEvent.getContent().notifications[notifLevelKey];\n }\n\n return member.powerLevel >= notifLevel;\n }\n\n /**\n * Returns the join rule based on the m.room.join_rule state event, defaulting to `invite`.\n * @returns the join_rule applied to this room\n */\n public getJoinRule(): JoinRule {\n const joinRuleEvent = this.getStateEvents(EventType.RoomJoinRules, \"\");\n const joinRuleContent: Partial<RoomJoinRulesEventContent> = joinRuleEvent?.getContent() ?? {};\n return joinRuleContent[\"join_rule\"] || JoinRule.Invite;\n }\n\n /**\n * Returns the history visibility based on the m.room.history_visibility state event, defaulting to `shared`.\n * @returns the history_visibility applied to this room\n */\n public getHistoryVisibility(): HistoryVisibility {\n const historyVisibilityEvent = this.getStateEvents(EventType.RoomHistoryVisibility, \"\");\n const historyVisibilityContent = historyVisibilityEvent?.getContent() ?? {};\n return historyVisibilityContent[\"history_visibility\"] || HistoryVisibility.Shared;\n }\n\n /**\n * Returns the guest access based on the m.room.guest_access state event, defaulting to `shared`.\n * @returns the guest_access applied to this room\n */\n public getGuestAccess(): GuestAccess {\n const guestAccessEvent = this.getStateEvents(EventType.RoomGuestAccess, \"\");\n const guestAccessContent = guestAccessEvent?.getContent() ?? {};\n return guestAccessContent[\"guest_access\"] || GuestAccess.Forbidden;\n }\n\n /**\n * Find the predecessor room based on this room state.\n *\n * @param msc3946ProcessDynamicPredecessor - if true, look for an\n * m.room.predecessor state event and use it if found (MSC3946).\n * @returns null if this room has no predecessor. Otherwise, returns\n * the roomId, last eventId and viaServers of the predecessor room.\n *\n * If msc3946ProcessDynamicPredecessor is true, use m.predecessor events\n * as well as m.room.create events to find predecessors.\n *\n * Note: if an m.predecessor event is used, eventId may be undefined\n * since last_known_event_id is optional.\n *\n * Note: viaServers may be undefined, and will definitely be undefined if\n * this predecessor comes from a RoomCreate event (rather than a\n * RoomPredecessor, which has the optional via_servers property).\n */\n public findPredecessor(\n msc3946ProcessDynamicPredecessor = false,\n ): { roomId: string; eventId?: string; viaServers?: string[] } | null {\n // Note: the tests for this function are against Room.findPredecessor,\n // which just calls through to here.\n\n if (msc3946ProcessDynamicPredecessor) {\n const predecessorEvent = this.getStateEvents(EventType.RoomPredecessor, \"\");\n if (predecessorEvent) {\n const content = predecessorEvent.getContent<{\n predecessor_room_id: string;\n last_known_event_id?: string;\n via_servers?: string[];\n }>();\n const roomId = content.predecessor_room_id;\n let eventId = content.last_known_event_id;\n if (typeof eventId !== \"string\") {\n eventId = undefined;\n }\n let viaServers = content.via_servers;\n if (!Array.isArray(viaServers)) {\n viaServers = undefined;\n }\n if (typeof roomId === \"string\") {\n return { roomId, eventId, viaServers };\n }\n }\n }\n\n const createEvent = this.getStateEvents(EventType.RoomCreate, \"\");\n if (createEvent) {\n const predecessor = createEvent.getContent<{\n predecessor?: Partial<{\n room_id: string;\n event_id: string;\n }>;\n }>()[\"predecessor\"];\n if (predecessor) {\n const roomId = predecessor[\"room_id\"];\n if (typeof roomId === \"string\") {\n let eventId = predecessor[\"event_id\"];\n if (typeof eventId !== \"string\" || eventId === \"\") {\n eventId = undefined;\n }\n return { roomId, eventId };\n }\n }\n }\n return null;\n }\n\n private updateThirdPartyTokenCache(memberEvent: MatrixEvent): void {\n if (!memberEvent.getContent().third_party_invite) {\n return;\n }\n const token = (memberEvent.getContent().third_party_invite.signed || {}).token;\n if (!token) {\n return;\n }\n const threePidInvite = this.getStateEvents(EventType.RoomThirdPartyInvite, token);\n if (!threePidInvite) {\n return;\n }\n this.tokenToInvite[token] = memberEvent;\n }\n\n private updateDisplayNameCache(userId: string, displayName: string): void {\n const oldName = this.userIdsToDisplayNames[userId];\n delete this.userIdsToDisplayNames[userId];\n if (oldName) {\n // Remove the old name from the cache.\n // We clobber the user_id > name lookup but the name -> [user_id] lookup\n // means we need to remove that user ID from that array rather than nuking\n // the lot.\n const strippedOldName = removeHiddenChars(oldName);\n\n const existingUserIds = this.displayNameToUserIds.get(strippedOldName);\n if (existingUserIds) {\n // remove this user ID from this array\n const filteredUserIDs = existingUserIds.filter((id) => id !== userId);\n this.displayNameToUserIds.set(strippedOldName, filteredUserIDs);\n }\n }\n\n this.userIdsToDisplayNames[userId] = displayName;\n\n const strippedDisplayname = displayName && removeHiddenChars(displayName);\n // an empty stripped displayname (undefined/'') will be set to MXID in room-member.js\n if (strippedDisplayname) {\n const arr = this.displayNameToUserIds.get(strippedDisplayname) ?? [];\n arr.push(userId);\n this.displayNameToUserIds.set(strippedDisplayname, arr);\n }\n }\n}\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,QAAQ,EAAEC,iBAAiB,QAAQ,aAAa;AACzD,SAASC,SAAS,EAAEC,uBAAuB,QAAQ,oBAAoB;AAGvE,SAASC,WAAW,EAAEC,iBAAiB,EAAEC,QAAQ,QAAQ,uBAAuB;AAChF,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,MAAM,EAAEC,WAAW,EAAyBC,uBAAuB,QAA0B,aAAa;AACnH,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,QAAQ,EAAEC,aAAa,QAAQ,qBAAqB;AAC7D,SAAS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IAAI,CAAC+E,cAAc,EAAE;MACjB;IACJ;IACA,IAAI,CAAC9E,aAAa,CAACD,KAAK,CAAC,GAAG4E,WAAW;EAC3C;EAEQ5J,sBAAsBA,CAAC3C,MAAc,EAAEiI,WAAmB,EAAQ;IACtE,IAAM2E,OAAO,GAAG,IAAI,CAACC,qBAAqB,CAAC7M,MAAM,CAAC;IAClD,OAAO,IAAI,CAAC6M,qBAAqB,CAAC7M,MAAM,CAAC;IACzC,IAAI4M,OAAO,EAAE;MACT;MACA;MACA;MACA;MACA,IAAME,eAAe,GAAGhQ,iBAAiB,CAAC8P,OAAO,CAAC;MAElD,IAAMG,eAAe,GAAG,IAAI,CAAC5E,oBAAoB,CAACrH,GAAG,CAACgM,eAAe,CAAC;MACtE,IAAIC,eAAe,EAAE;QACjB;QACA,IAAMC,eAAe,GAAGD,eAAe,CAACjN,MAAM,CAAEmN,EAAE,IAAKA,EAAE,KAAKjN,MAAM,CAAC;QACrE,IAAI,CAACmI,oBAAoB,CAAChD,GAAG,CAAC2H,eAAe,EAAEE,eAAe,CAAC;MACnE;IACJ;IAEA,IAAI,CAACH,qBAAqB,CAAC7M,MAAM,CAAC,GAAGiI,WAAW;IAEhD,IAAMiF,mBAAmB,GAAGjF,WAAW,IAAInL,iBAAiB,CAACmL,WAAW,CAAC;IACzE;IACA,IAAIiF,mBAAmB,EAAE;MAAA,IAAAC,sBAAA;MACrB,IAAMC,GAAG,IAAAD,sBAAA,GAAG,IAAI,CAAChF,oBAAoB,CAACrH,GAAG,CAACoM,mBAAmB,CAAC,cAAAC,sBAAA,cAAAA,sBAAA,GAAI,EAAE;MACpEC,GAAG,CAACC,IAAI,CAACrN,MAAM,CAAC;MAChB,IAAI,CAACmI,oBAAoB,CAAChD,GAAG,CAAC+H,mBAAmB,EAAEE,GAAG,CAAC;IAC3D;EACJ;AACJ","ignoreList":[]}
@@ -325,24 +325,6 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
325
325
  constructor(roomId: string, client: MatrixClient, myUserId: string, opts?: IOpts);
326
326
  private threadTimelineSetsPromise;
327
327
  createThreadsTimelineSets(): Promise<[EventTimelineSet, EventTimelineSet] | null>;
328
- /**
329
- * Bulk decrypt critical events in a room
330
- *
331
- * Critical events represents the minimal set of events to decrypt
332
- * for a typical UI to function properly
333
- *
334
- * - Last event of every room (to generate likely message preview)
335
- * - All events up to the read receipt (to calculate an accurate notification count)
336
- *
337
- * @returns Signals when all events have been decrypted
338
- */
339
- decryptCriticalEvents(): Promise<void>;
340
- /**
341
- * Bulk decrypt events in a room
342
- *
343
- * @returns Signals when all events have been decrypted
344
- */
345
- decryptAllEvents(): Promise<void>;
346
328
  /**
347
329
  * Gets the creator of the room
348
330
  * @returns The creator of the room, or null if it could not be determined
@@ -661,9 +643,14 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
661
643
  * "crop" or "scale".
662
644
  * @param allowDefault - True to allow an identicon for this room if an
663
645
  * avatar URL wasn't explicitly set. Default: true. (Deprecated)
646
+ * @param useAuthentication - (optional) If true, the caller supports authenticated
647
+ * media and wants an authentication-required URL. Note that server support for
648
+ * authenticated media will not be checked - it is the caller's responsibility
649
+ * to do so before calling this function. Note also that useAuthentication
650
+ * implies allowRedirects. Defaults to false (unauthenticated endpoints).
664
651
  * @returns the avatar URL or null.
665
652
  */
666
- getAvatarUrl(baseUrl: string, width: number, height: number, resizeMethod: ResizeMethod, allowDefault?: boolean): string | null;
653
+ getAvatarUrl(baseUrl: string, width: number, height: number, resizeMethod: ResizeMethod, allowDefault?: boolean, useAuthentication?: boolean): string | null;
667
654
  /**
668
655
  * Get the mxc avatar url for the room, if one was set.
669
656
  * @returns the mxc avatar url or falsy
@@ -700,7 +687,7 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
700
687
  * @remarks
701
688
  * Fires {@link RoomEvent.Timeline}
702
689
  */
703
- addEventsToTimeline(events: MatrixEvent[], toStartOfTimeline: boolean, timeline: EventTimeline, paginationToken?: string): void;
690
+ addEventsToTimeline(events: MatrixEvent[], toStartOfTimeline: boolean, addToState: boolean, timeline: EventTimeline, paginationToken?: string): void;
704
691
  /**
705
692
  * Get the instance of the thread associated with the current event
706
693
  * @param eventId - the ID of the current event
@@ -958,7 +945,7 @@ export declare class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandle
958
945
  * @param addLiveEventOptions - addLiveEvent options
959
946
  * @throws If `duplicateStrategy` is not falsey, 'replace' or 'ignore'.
960
947
  */
961
- addLiveEvents(events: MatrixEvent[], addLiveEventOptions?: IAddLiveEventOptions): Promise<void>;
948
+ addLiveEvents(events: MatrixEvent[], addLiveEventOptions: IAddLiveEventOptions): Promise<void>;
962
949
  partitionThreadedEvents(events: MatrixEvent[]): [timelineEvents: MatrixEvent[], threadedEvents: MatrixEvent[], unknownRelations: MatrixEvent[]];
963
950
  /**
964
951
  * Given some events, find the IDs of all the thread roots that are referred to by them.
@@ -1 +1 @@
1
- {"version":3,"file":"room.d.ts","sourceRoot":"","sources":["../../src/models/room.ts"],"names":[],"mappings":"AAkBA,OAAO,EACH,gBAAgB,EAEhB,oBAAoB,EACpB,0BAA0B,EAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAa,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAI/D,OAAO,EAAsC,WAAW,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACH,SAAS,EAET,QAAQ,EAKX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAA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