@unwanted/matrix-sdk-mini 34.12.0-1 → 34.12.0-3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (636) hide show
  1. package/git-revision.txt +1 -1
  2. package/lib/@types/event.d.ts +0 -19
  3. package/lib/@types/event.d.ts.map +1 -1
  4. package/lib/@types/event.js.map +1 -1
  5. package/lib/@types/global.d.js +0 -2
  6. package/lib/@types/global.d.js.map +1 -1
  7. package/lib/browser-index.d.ts.map +1 -1
  8. package/lib/browser-index.js +0 -11
  9. package/lib/browser-index.js.map +1 -1
  10. package/lib/client.d.ts +2 -1224
  11. package/lib/client.d.ts.map +1 -1
  12. package/lib/client.js +345 -2826
  13. package/lib/client.js.map +1 -1
  14. package/lib/embedded.d.ts +0 -22
  15. package/lib/embedded.d.ts.map +1 -1
  16. package/lib/embedded.js +24 -167
  17. package/lib/embedded.js.map +1 -1
  18. package/lib/event-mapper.d.ts.map +1 -1
  19. package/lib/event-mapper.js +0 -4
  20. package/lib/event-mapper.js.map +1 -1
  21. package/lib/matrix.d.ts +0 -25
  22. package/lib/matrix.d.ts.map +1 -1
  23. package/lib/matrix.js +1 -30
  24. package/lib/matrix.js.map +1 -1
  25. package/lib/models/MSC3089Branch.d.ts.map +1 -1
  26. package/lib/models/MSC3089Branch.js +0 -3
  27. package/lib/models/MSC3089Branch.js.map +1 -1
  28. package/lib/models/event.d.ts +0 -94
  29. package/lib/models/event.d.ts.map +1 -1
  30. package/lib/models/event.js +0 -274
  31. package/lib/models/event.js.map +1 -1
  32. package/lib/models/poll.d.ts.map +1 -1
  33. package/lib/models/poll.js +1 -5
  34. package/lib/models/poll.js.map +1 -1
  35. package/lib/models/relations-container.d.ts.map +1 -1
  36. package/lib/models/relations-container.js +1 -7
  37. package/lib/models/relations-container.js.map +1 -1
  38. package/lib/models/relations.d.ts +0 -1
  39. package/lib/models/relations.d.ts.map +1 -1
  40. package/lib/models/relations.js +0 -8
  41. package/lib/models/relations.js.map +1 -1
  42. package/lib/models/room-state.d.ts.map +1 -1
  43. package/lib/models/room-state.js +10 -26
  44. package/lib/models/room-state.js.map +1 -1
  45. package/lib/models/room.d.ts +0 -18
  46. package/lib/models/room.d.ts.map +1 -1
  47. package/lib/models/room.js +94 -148
  48. package/lib/models/room.js.map +1 -1
  49. package/lib/models/thread.d.ts.map +1 -1
  50. package/lib/models/thread.js +0 -1
  51. package/lib/models/thread.js.map +1 -1
  52. package/lib/sliding-sync-sdk.d.ts +2 -3
  53. package/lib/sliding-sync-sdk.d.ts.map +1 -1
  54. package/lib/sliding-sync-sdk.js +41 -90
  55. package/lib/sliding-sync-sdk.js.map +1 -1
  56. package/lib/sync.d.ts +0 -12
  57. package/lib/sync.d.ts.map +1 -1
  58. package/lib/sync.js +1 -73
  59. package/lib/sync.js.map +1 -1
  60. package/lib/testing.d.ts +0 -48
  61. package/lib/testing.d.ts.map +1 -1
  62. package/lib/testing.js +0 -105
  63. package/lib/testing.js.map +1 -1
  64. package/package.json +1 -3
  65. package/src/@types/event.ts +2 -36
  66. package/src/@types/global.d.ts +0 -3
  67. package/src/browser-index.ts +0 -11
  68. package/src/client.ts +52 -2876
  69. package/src/embedded.ts +3 -132
  70. package/src/event-mapper.ts +0 -4
  71. package/src/matrix.ts +0 -41
  72. package/src/models/MSC3089Branch.ts +0 -3
  73. package/src/models/event.ts +0 -289
  74. package/src/models/poll.ts +0 -6
  75. package/src/models/relations-container.ts +1 -8
  76. package/src/models/relations.ts +0 -8
  77. package/src/models/room-state.ts +2 -8
  78. package/src/models/room.ts +0 -62
  79. package/src/models/thread.ts +0 -1
  80. package/src/sliding-sync-sdk.ts +2 -72
  81. package/src/sync.ts +1 -98
  82. package/src/testing.ts +0 -108
  83. package/lib/@types/crypto.d.ts +0 -47
  84. package/lib/@types/crypto.d.ts.map +0 -1
  85. package/lib/@types/crypto.js +0 -1
  86. package/lib/@types/crypto.js.map +0 -1
  87. package/lib/@types/matrix-sdk-crypto-wasm.d.js +0 -1
  88. package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +0 -1
  89. package/lib/common-crypto/CryptoBackend.d.ts +0 -240
  90. package/lib/common-crypto/CryptoBackend.d.ts.map +0 -1
  91. package/lib/common-crypto/CryptoBackend.js +0 -73
  92. package/lib/common-crypto/CryptoBackend.js.map +0 -1
  93. package/lib/common-crypto/key-passphrase.d.ts +0 -14
  94. package/lib/common-crypto/key-passphrase.d.ts.map +0 -1
  95. package/lib/common-crypto/key-passphrase.js +0 -33
  96. package/lib/common-crypto/key-passphrase.js.map +0 -1
  97. package/lib/crypto/CrossSigning.d.ts +0 -184
  98. package/lib/crypto/CrossSigning.d.ts.map +0 -1
  99. package/lib/crypto/CrossSigning.js +0 -718
  100. package/lib/crypto/CrossSigning.js.map +0 -1
  101. package/lib/crypto/DeviceList.d.ts +0 -216
  102. package/lib/crypto/DeviceList.d.ts.map +0 -1
  103. package/lib/crypto/DeviceList.js +0 -892
  104. package/lib/crypto/DeviceList.js.map +0 -1
  105. package/lib/crypto/EncryptionSetup.d.ts +0 -152
  106. package/lib/crypto/EncryptionSetup.d.ts.map +0 -1
  107. package/lib/crypto/EncryptionSetup.js +0 -356
  108. package/lib/crypto/EncryptionSetup.js.map +0 -1
  109. package/lib/crypto/OlmDevice.d.ts +0 -457
  110. package/lib/crypto/OlmDevice.d.ts.map +0 -1
  111. package/lib/crypto/OlmDevice.js +0 -1241
  112. package/lib/crypto/OlmDevice.js.map +0 -1
  113. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts +0 -109
  114. package/lib/crypto/OutgoingRoomKeyRequestManager.d.ts.map +0 -1
  115. package/lib/crypto/OutgoingRoomKeyRequestManager.js +0 -415
  116. package/lib/crypto/OutgoingRoomKeyRequestManager.js.map +0 -1
  117. package/lib/crypto/RoomList.d.ts +0 -26
  118. package/lib/crypto/RoomList.d.ts.map +0 -1
  119. package/lib/crypto/RoomList.js +0 -71
  120. package/lib/crypto/RoomList.js.map +0 -1
  121. package/lib/crypto/SecretSharing.d.ts +0 -24
  122. package/lib/crypto/SecretSharing.d.ts.map +0 -1
  123. package/lib/crypto/SecretSharing.js +0 -194
  124. package/lib/crypto/SecretSharing.js.map +0 -1
  125. package/lib/crypto/SecretStorage.d.ts +0 -55
  126. package/lib/crypto/SecretStorage.d.ts.map +0 -1
  127. package/lib/crypto/SecretStorage.js +0 -118
  128. package/lib/crypto/SecretStorage.js.map +0 -1
  129. package/lib/crypto/aes.d.ts +0 -6
  130. package/lib/crypto/aes.d.ts.map +0 -1
  131. package/lib/crypto/aes.js +0 -24
  132. package/lib/crypto/aes.js.map +0 -1
  133. package/lib/crypto/algorithms/base.d.ts +0 -156
  134. package/lib/crypto/algorithms/base.d.ts.map +0 -1
  135. package/lib/crypto/algorithms/base.js +0 -187
  136. package/lib/crypto/algorithms/base.js.map +0 -1
  137. package/lib/crypto/algorithms/index.d.ts +0 -4
  138. package/lib/crypto/algorithms/index.d.ts.map +0 -1
  139. package/lib/crypto/algorithms/index.js +0 -20
  140. package/lib/crypto/algorithms/index.js.map +0 -1
  141. package/lib/crypto/algorithms/megolm.d.ts +0 -385
  142. package/lib/crypto/algorithms/megolm.d.ts.map +0 -1
  143. package/lib/crypto/algorithms/megolm.js +0 -1822
  144. package/lib/crypto/algorithms/megolm.js.map +0 -1
  145. package/lib/crypto/algorithms/olm.d.ts +0 -5
  146. package/lib/crypto/algorithms/olm.d.ts.map +0 -1
  147. package/lib/crypto/algorithms/olm.js +0 -299
  148. package/lib/crypto/algorithms/olm.js.map +0 -1
  149. package/lib/crypto/api.d.ts +0 -32
  150. package/lib/crypto/api.d.ts.map +0 -1
  151. package/lib/crypto/api.js +0 -22
  152. package/lib/crypto/api.js.map +0 -1
  153. package/lib/crypto/backup.d.ts +0 -227
  154. package/lib/crypto/backup.d.ts.map +0 -1
  155. package/lib/crypto/backup.js +0 -824
  156. package/lib/crypto/backup.js.map +0 -1
  157. package/lib/crypto/crypto.d.ts +0 -3
  158. package/lib/crypto/crypto.d.ts.map +0 -1
  159. package/lib/crypto/crypto.js +0 -19
  160. package/lib/crypto/crypto.js.map +0 -1
  161. package/lib/crypto/dehydration.d.ts +0 -34
  162. package/lib/crypto/dehydration.d.ts.map +0 -1
  163. package/lib/crypto/dehydration.js +0 -252
  164. package/lib/crypto/dehydration.js.map +0 -1
  165. package/lib/crypto/device-converter.d.ts +0 -9
  166. package/lib/crypto/device-converter.d.ts.map +0 -1
  167. package/lib/crypto/device-converter.js +0 -42
  168. package/lib/crypto/device-converter.js.map +0 -1
  169. package/lib/crypto/deviceinfo.d.ts +0 -99
  170. package/lib/crypto/deviceinfo.d.ts.map +0 -1
  171. package/lib/crypto/deviceinfo.js +0 -148
  172. package/lib/crypto/deviceinfo.js.map +0 -1
  173. package/lib/crypto/index.d.ts +0 -1209
  174. package/lib/crypto/index.d.ts.map +0 -1
  175. package/lib/crypto/index.js +0 -4097
  176. package/lib/crypto/index.js.map +0 -1
  177. package/lib/crypto/key_passphrase.d.ts +0 -14
  178. package/lib/crypto/key_passphrase.d.ts.map +0 -1
  179. package/lib/crypto/key_passphrase.js +0 -44
  180. package/lib/crypto/key_passphrase.js.map +0 -1
  181. package/lib/crypto/keybackup.d.ts +0 -18
  182. package/lib/crypto/keybackup.d.ts.map +0 -1
  183. package/lib/crypto/keybackup.js +0 -1
  184. package/lib/crypto/keybackup.js.map +0 -1
  185. package/lib/crypto/olmlib.d.ts +0 -129
  186. package/lib/crypto/olmlib.d.ts.map +0 -1
  187. package/lib/crypto/olmlib.js +0 -492
  188. package/lib/crypto/olmlib.js.map +0 -1
  189. package/lib/crypto/recoverykey.d.ts +0 -2
  190. package/lib/crypto/recoverykey.d.ts.map +0 -1
  191. package/lib/crypto/recoverykey.js +0 -19
  192. package/lib/crypto/recoverykey.js.map +0 -1
  193. package/lib/crypto/store/base.d.ts +0 -252
  194. package/lib/crypto/store/base.d.ts.map +0 -1
  195. package/lib/crypto/store/base.js +0 -64
  196. package/lib/crypto/store/base.js.map +0 -1
  197. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts +0 -187
  198. package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +0 -1
  199. package/lib/crypto/store/indexeddb-crypto-store-backend.js +0 -1145
  200. package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +0 -1
  201. package/lib/crypto/store/indexeddb-crypto-store.d.ts +0 -432
  202. package/lib/crypto/store/indexeddb-crypto-store.d.ts.map +0 -1
  203. package/lib/crypto/store/indexeddb-crypto-store.js +0 -728
  204. package/lib/crypto/store/indexeddb-crypto-store.js.map +0 -1
  205. package/lib/crypto/store/localStorage-crypto-store.d.ts +0 -119
  206. package/lib/crypto/store/localStorage-crypto-store.d.ts.map +0 -1
  207. package/lib/crypto/store/localStorage-crypto-store.js +0 -531
  208. package/lib/crypto/store/localStorage-crypto-store.js.map +0 -1
  209. package/lib/crypto/store/memory-crypto-store.d.ts +0 -215
  210. package/lib/crypto/store/memory-crypto-store.d.ts.map +0 -1
  211. package/lib/crypto/store/memory-crypto-store.js +0 -622
  212. package/lib/crypto/store/memory-crypto-store.js.map +0 -1
  213. package/lib/crypto/verification/Base.d.ts +0 -105
  214. package/lib/crypto/verification/Base.d.ts.map +0 -1
  215. package/lib/crypto/verification/Base.js +0 -372
  216. package/lib/crypto/verification/Base.js.map +0 -1
  217. package/lib/crypto/verification/Error.d.ts +0 -35
  218. package/lib/crypto/verification/Error.d.ts.map +0 -1
  219. package/lib/crypto/verification/Error.js +0 -86
  220. package/lib/crypto/verification/Error.js.map +0 -1
  221. package/lib/crypto/verification/IllegalMethod.d.ts +0 -15
  222. package/lib/crypto/verification/IllegalMethod.d.ts.map +0 -1
  223. package/lib/crypto/verification/IllegalMethod.js +0 -43
  224. package/lib/crypto/verification/IllegalMethod.js.map +0 -1
  225. package/lib/crypto/verification/QRCode.d.ts +0 -51
  226. package/lib/crypto/verification/QRCode.d.ts.map +0 -1
  227. package/lib/crypto/verification/QRCode.js +0 -277
  228. package/lib/crypto/verification/QRCode.js.map +0 -1
  229. package/lib/crypto/verification/SAS.d.ts +0 -27
  230. package/lib/crypto/verification/SAS.d.ts.map +0 -1
  231. package/lib/crypto/verification/SAS.js +0 -485
  232. package/lib/crypto/verification/SAS.js.map +0 -1
  233. package/lib/crypto/verification/SASDecimal.d.ts +0 -8
  234. package/lib/crypto/verification/SASDecimal.d.ts.map +0 -1
  235. package/lib/crypto/verification/SASDecimal.js +0 -34
  236. package/lib/crypto/verification/SASDecimal.js.map +0 -1
  237. package/lib/crypto/verification/request/Channel.d.ts +0 -18
  238. package/lib/crypto/verification/request/Channel.d.ts.map +0 -1
  239. package/lib/crypto/verification/request/Channel.js +0 -1
  240. package/lib/crypto/verification/request/Channel.js.map +0 -1
  241. package/lib/crypto/verification/request/InRoomChannel.d.ts +0 -113
  242. package/lib/crypto/verification/request/InRoomChannel.d.ts.map +0 -1
  243. package/lib/crypto/verification/request/InRoomChannel.js +0 -351
  244. package/lib/crypto/verification/request/InRoomChannel.js.map +0 -1
  245. package/lib/crypto/verification/request/ToDeviceChannel.d.ts +0 -105
  246. package/lib/crypto/verification/request/ToDeviceChannel.d.ts.map +0 -1
  247. package/lib/crypto/verification/request/ToDeviceChannel.js +0 -328
  248. package/lib/crypto/verification/request/ToDeviceChannel.js.map +0 -1
  249. package/lib/crypto/verification/request/VerificationRequest.d.ts +0 -227
  250. package/lib/crypto/verification/request/VerificationRequest.d.ts.map +0 -1
  251. package/lib/crypto/verification/request/VerificationRequest.js +0 -937
  252. package/lib/crypto/verification/request/VerificationRequest.js.map +0 -1
  253. package/lib/crypto-api/CryptoEvent.d.ts +0 -69
  254. package/lib/crypto-api/CryptoEvent.d.ts.map +0 -1
  255. package/lib/crypto-api/CryptoEvent.js +0 -33
  256. package/lib/crypto-api/CryptoEvent.js.map +0 -1
  257. package/lib/crypto-api/CryptoEventHandlerMap.d.ts +0 -16
  258. package/lib/crypto-api/CryptoEventHandlerMap.d.ts.map +0 -1
  259. package/lib/crypto-api/CryptoEventHandlerMap.js +0 -22
  260. package/lib/crypto-api/CryptoEventHandlerMap.js.map +0 -1
  261. package/lib/crypto-api/index.d.ts +0 -978
  262. package/lib/crypto-api/index.d.ts.map +0 -1
  263. package/lib/crypto-api/index.js +0 -304
  264. package/lib/crypto-api/index.js.map +0 -1
  265. package/lib/crypto-api/key-passphrase.d.ts +0 -11
  266. package/lib/crypto-api/key-passphrase.d.ts.map +0 -1
  267. package/lib/crypto-api/key-passphrase.js +0 -51
  268. package/lib/crypto-api/key-passphrase.js.map +0 -1
  269. package/lib/crypto-api/keybackup.d.ts +0 -88
  270. package/lib/crypto-api/keybackup.d.ts.map +0 -1
  271. package/lib/crypto-api/keybackup.js +0 -1
  272. package/lib/crypto-api/keybackup.js.map +0 -1
  273. package/lib/crypto-api/recovery-key.d.ts +0 -11
  274. package/lib/crypto-api/recovery-key.d.ts.map +0 -1
  275. package/lib/crypto-api/recovery-key.js +0 -65
  276. package/lib/crypto-api/recovery-key.js.map +0 -1
  277. package/lib/crypto-api/verification.d.ts +0 -344
  278. package/lib/crypto-api/verification.d.ts.map +0 -1
  279. package/lib/crypto-api/verification.js +0 -91
  280. package/lib/crypto-api/verification.js.map +0 -1
  281. package/lib/matrixrtc/CallMembership.d.ts +0 -66
  282. package/lib/matrixrtc/CallMembership.d.ts.map +0 -1
  283. package/lib/matrixrtc/CallMembership.js +0 -197
  284. package/lib/matrixrtc/CallMembership.js.map +0 -1
  285. package/lib/matrixrtc/LivekitFocus.d.ts +0 -16
  286. package/lib/matrixrtc/LivekitFocus.d.ts.map +0 -1
  287. package/lib/matrixrtc/LivekitFocus.js +0 -20
  288. package/lib/matrixrtc/LivekitFocus.js.map +0 -1
  289. package/lib/matrixrtc/MatrixRTCSession.d.ts +0 -295
  290. package/lib/matrixrtc/MatrixRTCSession.d.ts.map +0 -1
  291. package/lib/matrixrtc/MatrixRTCSession.js +0 -1043
  292. package/lib/matrixrtc/MatrixRTCSession.js.map +0 -1
  293. package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +0 -40
  294. package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +0 -1
  295. package/lib/matrixrtc/MatrixRTCSessionManager.js +0 -146
  296. package/lib/matrixrtc/MatrixRTCSessionManager.js.map +0 -1
  297. package/lib/matrixrtc/focus.d.ts +0 -10
  298. package/lib/matrixrtc/focus.d.ts.map +0 -1
  299. package/lib/matrixrtc/focus.js +0 -1
  300. package/lib/matrixrtc/focus.js.map +0 -1
  301. package/lib/matrixrtc/index.d.ts +0 -7
  302. package/lib/matrixrtc/index.d.ts.map +0 -1
  303. package/lib/matrixrtc/index.js +0 -21
  304. package/lib/matrixrtc/index.js.map +0 -1
  305. package/lib/matrixrtc/types.d.ts +0 -19
  306. package/lib/matrixrtc/types.d.ts.map +0 -1
  307. package/lib/matrixrtc/types.js +0 -1
  308. package/lib/matrixrtc/types.js.map +0 -1
  309. package/lib/rendezvous/MSC4108SignInWithQR.d.ts +0 -112
  310. package/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +0 -1
  311. package/lib/rendezvous/MSC4108SignInWithQR.js +0 -392
  312. package/lib/rendezvous/MSC4108SignInWithQR.js.map +0 -1
  313. package/lib/rendezvous/RendezvousChannel.d.ts +0 -27
  314. package/lib/rendezvous/RendezvousChannel.d.ts.map +0 -1
  315. package/lib/rendezvous/RendezvousChannel.js +0 -1
  316. package/lib/rendezvous/RendezvousChannel.js.map +0 -1
  317. package/lib/rendezvous/RendezvousCode.d.ts +0 -9
  318. package/lib/rendezvous/RendezvousCode.d.ts.map +0 -1
  319. package/lib/rendezvous/RendezvousCode.js +0 -1
  320. package/lib/rendezvous/RendezvousCode.js.map +0 -1
  321. package/lib/rendezvous/RendezvousError.d.ts +0 -6
  322. package/lib/rendezvous/RendezvousError.d.ts.map +0 -1
  323. package/lib/rendezvous/RendezvousError.js +0 -23
  324. package/lib/rendezvous/RendezvousError.js.map +0 -1
  325. package/lib/rendezvous/RendezvousFailureReason.d.ts +0 -31
  326. package/lib/rendezvous/RendezvousFailureReason.d.ts.map +0 -1
  327. package/lib/rendezvous/RendezvousFailureReason.js +0 -38
  328. package/lib/rendezvous/RendezvousFailureReason.js.map +0 -1
  329. package/lib/rendezvous/RendezvousIntent.d.ts +0 -5
  330. package/lib/rendezvous/RendezvousIntent.d.ts.map +0 -1
  331. package/lib/rendezvous/RendezvousIntent.js +0 -22
  332. package/lib/rendezvous/RendezvousIntent.js.map +0 -1
  333. package/lib/rendezvous/RendezvousTransport.d.ts +0 -36
  334. package/lib/rendezvous/RendezvousTransport.d.ts.map +0 -1
  335. package/lib/rendezvous/RendezvousTransport.js +0 -1
  336. package/lib/rendezvous/RendezvousTransport.js.map +0 -1
  337. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts +0 -58
  338. package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +0 -1
  339. package/lib/rendezvous/channels/MSC4108SecureChannel.js +0 -246
  340. package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +0 -1
  341. package/lib/rendezvous/channels/index.d.ts +0 -2
  342. package/lib/rendezvous/channels/index.d.ts.map +0 -1
  343. package/lib/rendezvous/channels/index.js +0 -18
  344. package/lib/rendezvous/channels/index.js.map +0 -1
  345. package/lib/rendezvous/index.d.ts +0 -10
  346. package/lib/rendezvous/index.d.ts.map +0 -1
  347. package/lib/rendezvous/index.js +0 -23
  348. package/lib/rendezvous/index.js.map +0 -1
  349. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +0 -61
  350. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +0 -1
  351. package/lib/rendezvous/transports/MSC4108RendezvousSession.js +0 -253
  352. package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +0 -1
  353. package/lib/rendezvous/transports/index.d.ts +0 -2
  354. package/lib/rendezvous/transports/index.d.ts.map +0 -1
  355. package/lib/rendezvous/transports/index.js +0 -18
  356. package/lib/rendezvous/transports/index.js.map +0 -1
  357. package/lib/rust-crypto/CrossSigningIdentity.d.ts +0 -33
  358. package/lib/rust-crypto/CrossSigningIdentity.d.ts.map +0 -1
  359. package/lib/rust-crypto/CrossSigningIdentity.js +0 -157
  360. package/lib/rust-crypto/CrossSigningIdentity.js.map +0 -1
  361. package/lib/rust-crypto/DehydratedDeviceManager.d.ts +0 -98
  362. package/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +0 -1
  363. package/lib/rust-crypto/DehydratedDeviceManager.js +0 -285
  364. package/lib/rust-crypto/DehydratedDeviceManager.js.map +0 -1
  365. package/lib/rust-crypto/KeyClaimManager.d.ts +0 -33
  366. package/lib/rust-crypto/KeyClaimManager.d.ts.map +0 -1
  367. package/lib/rust-crypto/KeyClaimManager.js +0 -82
  368. package/lib/rust-crypto/KeyClaimManager.js.map +0 -1
  369. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +0 -43
  370. package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +0 -1
  371. package/lib/rust-crypto/OutgoingRequestProcessor.js +0 -195
  372. package/lib/rust-crypto/OutgoingRequestProcessor.js.map +0 -1
  373. package/lib/rust-crypto/OutgoingRequestsManager.d.ts +0 -47
  374. package/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +0 -1
  375. package/lib/rust-crypto/OutgoingRequestsManager.js +0 -148
  376. package/lib/rust-crypto/OutgoingRequestsManager.js.map +0 -1
  377. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +0 -120
  378. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +0 -1
  379. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +0 -467
  380. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +0 -1
  381. package/lib/rust-crypto/RoomEncryptor.d.ts +0 -98
  382. package/lib/rust-crypto/RoomEncryptor.d.ts.map +0 -1
  383. package/lib/rust-crypto/RoomEncryptor.js +0 -299
  384. package/lib/rust-crypto/RoomEncryptor.js.map +0 -1
  385. package/lib/rust-crypto/backup.d.ts +0 -254
  386. package/lib/rust-crypto/backup.d.ts.map +0 -1
  387. package/lib/rust-crypto/backup.js +0 -837
  388. package/lib/rust-crypto/backup.js.map +0 -1
  389. package/lib/rust-crypto/constants.d.ts +0 -3
  390. package/lib/rust-crypto/constants.d.ts.map +0 -1
  391. package/lib/rust-crypto/constants.js +0 -19
  392. package/lib/rust-crypto/constants.js.map +0 -1
  393. package/lib/rust-crypto/device-converter.d.ts +0 -28
  394. package/lib/rust-crypto/device-converter.d.ts.map +0 -1
  395. package/lib/rust-crypto/device-converter.js +0 -123
  396. package/lib/rust-crypto/device-converter.js.map +0 -1
  397. package/lib/rust-crypto/index.d.ts +0 -61
  398. package/lib/rust-crypto/index.d.ts.map +0 -1
  399. package/lib/rust-crypto/index.js +0 -152
  400. package/lib/rust-crypto/index.js.map +0 -1
  401. package/lib/rust-crypto/libolm_migration.d.ts +0 -81
  402. package/lib/rust-crypto/libolm_migration.d.ts.map +0 -1
  403. package/lib/rust-crypto/libolm_migration.js +0 -459
  404. package/lib/rust-crypto/libolm_migration.js.map +0 -1
  405. package/lib/rust-crypto/rust-crypto.d.ts +0 -556
  406. package/lib/rust-crypto/rust-crypto.d.ts.map +0 -1
  407. package/lib/rust-crypto/rust-crypto.js +0 -2016
  408. package/lib/rust-crypto/rust-crypto.js.map +0 -1
  409. package/lib/rust-crypto/secret-storage.d.ts +0 -22
  410. package/lib/rust-crypto/secret-storage.d.ts.map +0 -1
  411. package/lib/rust-crypto/secret-storage.js +0 -63
  412. package/lib/rust-crypto/secret-storage.js.map +0 -1
  413. package/lib/rust-crypto/verification.d.ts +0 -319
  414. package/lib/rust-crypto/verification.d.ts.map +0 -1
  415. package/lib/rust-crypto/verification.js +0 -816
  416. package/lib/rust-crypto/verification.js.map +0 -1
  417. package/lib/secret-storage.d.ts +0 -370
  418. package/lib/secret-storage.d.ts.map +0 -1
  419. package/lib/secret-storage.js +0 -466
  420. package/lib/secret-storage.js.map +0 -1
  421. package/lib/webrtc/audioContext.d.ts +0 -15
  422. package/lib/webrtc/audioContext.d.ts.map +0 -1
  423. package/lib/webrtc/audioContext.js +0 -46
  424. package/lib/webrtc/audioContext.js.map +0 -1
  425. package/lib/webrtc/call.d.ts +0 -560
  426. package/lib/webrtc/call.d.ts.map +0 -1
  427. package/lib/webrtc/call.js +0 -2541
  428. package/lib/webrtc/call.js.map +0 -1
  429. package/lib/webrtc/callEventHandler.d.ts +0 -37
  430. package/lib/webrtc/callEventHandler.d.ts.map +0 -1
  431. package/lib/webrtc/callEventHandler.js +0 -344
  432. package/lib/webrtc/callEventHandler.js.map +0 -1
  433. package/lib/webrtc/callEventTypes.d.ts +0 -73
  434. package/lib/webrtc/callEventTypes.d.ts.map +0 -1
  435. package/lib/webrtc/callEventTypes.js +0 -13
  436. package/lib/webrtc/callEventTypes.js.map +0 -1
  437. package/lib/webrtc/callFeed.d.ts +0 -128
  438. package/lib/webrtc/callFeed.d.ts.map +0 -1
  439. package/lib/webrtc/callFeed.js +0 -289
  440. package/lib/webrtc/callFeed.js.map +0 -1
  441. package/lib/webrtc/groupCall.d.ts +0 -323
  442. package/lib/webrtc/groupCall.d.ts.map +0 -1
  443. package/lib/webrtc/groupCall.js +0 -1337
  444. package/lib/webrtc/groupCall.js.map +0 -1
  445. package/lib/webrtc/groupCallEventHandler.d.ts +0 -31
  446. package/lib/webrtc/groupCallEventHandler.d.ts.map +0 -1
  447. package/lib/webrtc/groupCallEventHandler.js +0 -178
  448. package/lib/webrtc/groupCallEventHandler.js.map +0 -1
  449. package/lib/webrtc/mediaHandler.d.ts +0 -89
  450. package/lib/webrtc/mediaHandler.d.ts.map +0 -1
  451. package/lib/webrtc/mediaHandler.js +0 -437
  452. package/lib/webrtc/mediaHandler.js.map +0 -1
  453. package/lib/webrtc/stats/callFeedStatsReporter.d.ts +0 -8
  454. package/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +0 -1
  455. package/lib/webrtc/stats/callFeedStatsReporter.js +0 -82
  456. package/lib/webrtc/stats/callFeedStatsReporter.js.map +0 -1
  457. package/lib/webrtc/stats/callStatsReportGatherer.d.ts +0 -25
  458. package/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +0 -1
  459. package/lib/webrtc/stats/callStatsReportGatherer.js +0 -199
  460. package/lib/webrtc/stats/callStatsReportGatherer.js.map +0 -1
  461. package/lib/webrtc/stats/callStatsReportSummary.d.ts +0 -17
  462. package/lib/webrtc/stats/callStatsReportSummary.d.ts.map +0 -1
  463. package/lib/webrtc/stats/callStatsReportSummary.js +0 -1
  464. package/lib/webrtc/stats/callStatsReportSummary.js.map +0 -1
  465. package/lib/webrtc/stats/connectionStats.d.ts +0 -28
  466. package/lib/webrtc/stats/connectionStats.d.ts.map +0 -1
  467. package/lib/webrtc/stats/connectionStats.js +0 -26
  468. package/lib/webrtc/stats/connectionStats.js.map +0 -1
  469. package/lib/webrtc/stats/connectionStatsBuilder.d.ts +0 -5
  470. package/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +0 -1
  471. package/lib/webrtc/stats/connectionStatsBuilder.js +0 -27
  472. package/lib/webrtc/stats/connectionStatsBuilder.js.map +0 -1
  473. package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts +0 -7
  474. package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +0 -1
  475. package/lib/webrtc/stats/connectionStatsReportBuilder.js +0 -121
  476. package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +0 -1
  477. package/lib/webrtc/stats/groupCallStats.d.ts +0 -22
  478. package/lib/webrtc/stats/groupCallStats.d.ts.map +0 -1
  479. package/lib/webrtc/stats/groupCallStats.js +0 -78
  480. package/lib/webrtc/stats/groupCallStats.js.map +0 -1
  481. package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts +0 -10
  482. package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +0 -1
  483. package/lib/webrtc/stats/media/mediaSsrcHandler.js +0 -57
  484. package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +0 -1
  485. package/lib/webrtc/stats/media/mediaTrackHandler.d.ts +0 -12
  486. package/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +0 -1
  487. package/lib/webrtc/stats/media/mediaTrackHandler.js +0 -62
  488. package/lib/webrtc/stats/media/mediaTrackHandler.js.map +0 -1
  489. package/lib/webrtc/stats/media/mediaTrackStats.d.ts +0 -86
  490. package/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +0 -1
  491. package/lib/webrtc/stats/media/mediaTrackStats.js +0 -142
  492. package/lib/webrtc/stats/media/mediaTrackStats.js.map +0 -1
  493. package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts +0 -22
  494. package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +0 -1
  495. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +0 -76
  496. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +0 -1
  497. package/lib/webrtc/stats/statsReport.d.ts +0 -99
  498. package/lib/webrtc/stats/statsReport.d.ts.map +0 -1
  499. package/lib/webrtc/stats/statsReport.js +0 -32
  500. package/lib/webrtc/stats/statsReport.js.map +0 -1
  501. package/lib/webrtc/stats/statsReportEmitter.d.ts +0 -15
  502. package/lib/webrtc/stats/statsReportEmitter.d.ts.map +0 -1
  503. package/lib/webrtc/stats/statsReportEmitter.js +0 -33
  504. package/lib/webrtc/stats/statsReportEmitter.js.map +0 -1
  505. package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts +0 -16
  506. package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +0 -1
  507. package/lib/webrtc/stats/summaryStatsReportGatherer.js +0 -116
  508. package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +0 -1
  509. package/lib/webrtc/stats/trackStatsBuilder.d.ts +0 -19
  510. package/lib/webrtc/stats/trackStatsBuilder.d.ts.map +0 -1
  511. package/lib/webrtc/stats/trackStatsBuilder.js +0 -168
  512. package/lib/webrtc/stats/trackStatsBuilder.js.map +0 -1
  513. package/lib/webrtc/stats/transportStats.d.ts +0 -11
  514. package/lib/webrtc/stats/transportStats.d.ts.map +0 -1
  515. package/lib/webrtc/stats/transportStats.js +0 -1
  516. package/lib/webrtc/stats/transportStats.js.map +0 -1
  517. package/lib/webrtc/stats/transportStatsBuilder.d.ts +0 -5
  518. package/lib/webrtc/stats/transportStatsBuilder.d.ts.map +0 -1
  519. package/lib/webrtc/stats/transportStatsBuilder.js +0 -34
  520. package/lib/webrtc/stats/transportStatsBuilder.js.map +0 -1
  521. package/lib/webrtc/stats/valueFormatter.d.ts +0 -4
  522. package/lib/webrtc/stats/valueFormatter.d.ts.map +0 -1
  523. package/lib/webrtc/stats/valueFormatter.js +0 -25
  524. package/lib/webrtc/stats/valueFormatter.js.map +0 -1
  525. package/src/@types/crypto.ts +0 -73
  526. package/src/@types/matrix-sdk-crypto-wasm.d.ts +0 -44
  527. package/src/common-crypto/CryptoBackend.ts +0 -302
  528. package/src/common-crypto/README.md +0 -4
  529. package/src/common-crypto/key-passphrase.ts +0 -43
  530. package/src/crypto/CrossSigning.ts +0 -773
  531. package/src/crypto/DeviceList.ts +0 -989
  532. package/src/crypto/EncryptionSetup.ts +0 -351
  533. package/src/crypto/OlmDevice.ts +0 -1500
  534. package/src/crypto/OutgoingRoomKeyRequestManager.ts +0 -485
  535. package/src/crypto/RoomList.ts +0 -70
  536. package/src/crypto/SecretSharing.ts +0 -240
  537. package/src/crypto/SecretStorage.ts +0 -136
  538. package/src/crypto/aes.ts +0 -23
  539. package/src/crypto/algorithms/base.ts +0 -236
  540. package/src/crypto/algorithms/index.ts +0 -20
  541. package/src/crypto/algorithms/megolm.ts +0 -2216
  542. package/src/crypto/algorithms/olm.ts +0 -381
  543. package/src/crypto/api.ts +0 -70
  544. package/src/crypto/backup.ts +0 -922
  545. package/src/crypto/crypto.ts +0 -18
  546. package/src/crypto/dehydration.ts +0 -272
  547. package/src/crypto/device-converter.ts +0 -45
  548. package/src/crypto/deviceinfo.ts +0 -158
  549. package/src/crypto/index.ts +0 -4414
  550. package/src/crypto/key_passphrase.ts +0 -42
  551. package/src/crypto/keybackup.ts +0 -47
  552. package/src/crypto/olmlib.ts +0 -539
  553. package/src/crypto/recoverykey.ts +0 -18
  554. package/src/crypto/store/base.ts +0 -348
  555. package/src/crypto/store/indexeddb-crypto-store-backend.ts +0 -1250
  556. package/src/crypto/store/indexeddb-crypto-store.ts +0 -845
  557. package/src/crypto/store/localStorage-crypto-store.ts +0 -579
  558. package/src/crypto/store/memory-crypto-store.ts +0 -680
  559. package/src/crypto/verification/Base.ts +0 -409
  560. package/src/crypto/verification/Error.ts +0 -76
  561. package/src/crypto/verification/IllegalMethod.ts +0 -50
  562. package/src/crypto/verification/QRCode.ts +0 -310
  563. package/src/crypto/verification/SAS.ts +0 -494
  564. package/src/crypto/verification/SASDecimal.ts +0 -37
  565. package/src/crypto/verification/request/Channel.ts +0 -34
  566. package/src/crypto/verification/request/InRoomChannel.ts +0 -371
  567. package/src/crypto/verification/request/ToDeviceChannel.ts +0 -354
  568. package/src/crypto/verification/request/VerificationRequest.ts +0 -976
  569. package/src/crypto-api/CryptoEvent.ts +0 -93
  570. package/src/crypto-api/CryptoEventHandlerMap.ts +0 -32
  571. package/src/crypto-api/index.ts +0 -1175
  572. package/src/crypto-api/key-passphrase.ts +0 -58
  573. package/src/crypto-api/keybackup.ts +0 -115
  574. package/src/crypto-api/recovery-key.ts +0 -69
  575. package/src/crypto-api/verification.ts +0 -408
  576. package/src/matrixrtc/CallMembership.ts +0 -247
  577. package/src/matrixrtc/LivekitFocus.ts +0 -39
  578. package/src/matrixrtc/MatrixRTCSession.ts +0 -1319
  579. package/src/matrixrtc/MatrixRTCSessionManager.ts +0 -166
  580. package/src/matrixrtc/focus.ts +0 -25
  581. package/src/matrixrtc/index.ts +0 -22
  582. package/src/matrixrtc/types.ts +0 -36
  583. package/src/rendezvous/MSC4108SignInWithQR.ts +0 -444
  584. package/src/rendezvous/RendezvousChannel.ts +0 -48
  585. package/src/rendezvous/RendezvousCode.ts +0 -25
  586. package/src/rendezvous/RendezvousError.ts +0 -26
  587. package/src/rendezvous/RendezvousFailureReason.ts +0 -49
  588. package/src/rendezvous/RendezvousIntent.ts +0 -20
  589. package/src/rendezvous/RendezvousTransport.ts +0 -58
  590. package/src/rendezvous/channels/MSC4108SecureChannel.ts +0 -270
  591. package/src/rendezvous/channels/index.ts +0 -17
  592. package/src/rendezvous/index.ts +0 -25
  593. package/src/rendezvous/transports/MSC4108RendezvousSession.ts +0 -270
  594. package/src/rendezvous/transports/index.ts +0 -17
  595. package/src/rust-crypto/CrossSigningIdentity.ts +0 -183
  596. package/src/rust-crypto/DehydratedDeviceManager.ts +0 -306
  597. package/src/rust-crypto/KeyClaimManager.ts +0 -86
  598. package/src/rust-crypto/OutgoingRequestProcessor.ts +0 -236
  599. package/src/rust-crypto/OutgoingRequestsManager.ts +0 -143
  600. package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +0 -501
  601. package/src/rust-crypto/RoomEncryptor.ts +0 -352
  602. package/src/rust-crypto/backup.ts +0 -881
  603. package/src/rust-crypto/constants.ts +0 -18
  604. package/src/rust-crypto/device-converter.ts +0 -128
  605. package/src/rust-crypto/index.ts +0 -237
  606. package/src/rust-crypto/libolm_migration.ts +0 -530
  607. package/src/rust-crypto/rust-crypto.ts +0 -2205
  608. package/src/rust-crypto/secret-storage.ts +0 -60
  609. package/src/rust-crypto/verification.ts +0 -830
  610. package/src/secret-storage.ts +0 -693
  611. package/src/webrtc/audioContext.ts +0 -44
  612. package/src/webrtc/call.ts +0 -3074
  613. package/src/webrtc/callEventHandler.ts +0 -425
  614. package/src/webrtc/callEventTypes.ts +0 -93
  615. package/src/webrtc/callFeed.ts +0 -364
  616. package/src/webrtc/groupCall.ts +0 -1735
  617. package/src/webrtc/groupCallEventHandler.ts +0 -234
  618. package/src/webrtc/mediaHandler.ts +0 -484
  619. package/src/webrtc/stats/callFeedStatsReporter.ts +0 -94
  620. package/src/webrtc/stats/callStatsReportGatherer.ts +0 -219
  621. package/src/webrtc/stats/callStatsReportSummary.ts +0 -30
  622. package/src/webrtc/stats/connectionStats.ts +0 -47
  623. package/src/webrtc/stats/connectionStatsBuilder.ts +0 -28
  624. package/src/webrtc/stats/connectionStatsReportBuilder.ts +0 -140
  625. package/src/webrtc/stats/groupCallStats.ts +0 -93
  626. package/src/webrtc/stats/media/mediaSsrcHandler.ts +0 -57
  627. package/src/webrtc/stats/media/mediaTrackHandler.ts +0 -76
  628. package/src/webrtc/stats/media/mediaTrackStats.ts +0 -176
  629. package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +0 -90
  630. package/src/webrtc/stats/statsReport.ts +0 -133
  631. package/src/webrtc/stats/statsReportEmitter.ts +0 -49
  632. package/src/webrtc/stats/summaryStatsReportGatherer.ts +0 -148
  633. package/src/webrtc/stats/trackStatsBuilder.ts +0 -207
  634. package/src/webrtc/stats/transportStats.ts +0 -26
  635. package/src/webrtc/stats/transportStatsBuilder.ts +0 -48
  636. package/src/webrtc/stats/valueFormatter.ts +0 -27
@@ -1 +1 @@
1
- {"version":3,"file":"event-mapper.js","names":["MatrixEvent","MatrixEventEvent","RelationType","eventMapperFor","client","options","preventReEmit","Boolean","decrypt","mapper","plainOldJsObject","toDevice","room_id","room","getRoom","event","state_key","undefined","findEventById","event_id","status","setUnsigned","_objectSpread","getUnsigned","unsigned","bundledEdit","getServerAggregatedRelation","Replace","content","replacement","makeReplaced","thread","findThreadForEvent","setThread","isEncrypted","reEmitter","reEmit","Decrypted","decryptEventIfNeeded","Replaced","VisibilityChange","BeforeRedaction"],"sources":["../src/event-mapper.ts"],"sourcesContent":["/*\nCopyright 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 { MatrixClient } from \"./client.ts\";\nimport { IEvent, MatrixEvent, MatrixEventEvent } from \"./models/event.ts\";\nimport { RelationType } from \"./@types/event.ts\";\n\nexport type EventMapper = (obj: Partial<IEvent>) => MatrixEvent;\n\nexport interface MapperOpts {\n // don't re-emit events emitted on an event mapped by this mapper on the client\n preventReEmit?: boolean;\n // decrypt event proactively\n decrypt?: boolean;\n // the event is a to_device event\n toDevice?: boolean;\n}\n\nexport function eventMapperFor(client: MatrixClient, options: MapperOpts): EventMapper {\n let preventReEmit = Boolean(options.preventReEmit);\n const decrypt = options.decrypt !== false;\n\n function mapper(plainOldJsObject: Partial<IEvent>): MatrixEvent {\n if (options.toDevice) {\n delete plainOldJsObject.room_id;\n }\n\n const room = client.getRoom(plainOldJsObject.room_id);\n\n let event: MatrixEvent | undefined;\n // If the event is already known to the room, let's re-use the model rather than duplicating.\n // We avoid doing this to state events as they may be forward or backwards looking which tweaks behaviour.\n if (room && plainOldJsObject.state_key === undefined) {\n event = room.findEventById(plainOldJsObject.event_id!);\n }\n\n if (!event || event.status) {\n event = new MatrixEvent(plainOldJsObject);\n } else {\n // merge the latest unsigned data from the server\n event.setUnsigned({ ...event.getUnsigned(), ...plainOldJsObject.unsigned });\n // prevent doubling up re-emitters\n preventReEmit = true;\n }\n\n // if there is a complete edit bundled alongside the event, perform the replacement.\n // (prior to MSC3925, events were automatically replaced on the server-side. MSC3925 proposes that that doesn't\n // happen automatically but the server does provide us with the whole content of the edit event.)\n const bundledEdit = event.getServerAggregatedRelation<Partial<IEvent>>(RelationType.Replace);\n if (bundledEdit?.content) {\n const replacement = mapper(bundledEdit);\n // XXX: it's worth noting that the spec says we should only respect encrypted edits if, once decrypted, the\n // replacement has a `m.new_content` property. The problem is that we haven't yet decrypted the replacement\n // (it should be happening in the background), so we can't enforce this. Possibly we should for decryption\n // to complete, but that sounds a bit racy. For now, we just assume it's ok.\n event.makeReplaced(replacement);\n }\n\n const thread = room?.findThreadForEvent(event);\n if (thread) {\n event.setThread(thread);\n }\n\n // TODO: once we get rid of the old libolm-backed crypto, we can restrict this to room events (rather than\n // to-device events), because the rust implementation decrypts to-device messages at a higher level.\n // Generally we probably want to use a different eventMapper implementation for to-device events because\n if (event.isEncrypted()) {\n if (!preventReEmit) {\n client.reEmitter.reEmit(event, [MatrixEventEvent.Decrypted]);\n }\n if (decrypt) {\n client.decryptEventIfNeeded(event);\n }\n }\n\n if (!preventReEmit) {\n client.reEmitter.reEmit(event, [MatrixEventEvent.Replaced, MatrixEventEvent.VisibilityChange]);\n room?.reEmitter.reEmit(event, [MatrixEventEvent.BeforeRedaction]);\n }\n return event;\n }\n\n return mapper;\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAAiBA,WAAW,EAAEC,gBAAgB,QAAQ,mBAAmB;AACzE,SAASC,YAAY,QAAQ,mBAAmB;AAahD,OAAO,SAASC,cAAcA,CAACC,MAAoB,EAAEC,OAAmB,EAAe;EACnF,IAAIC,aAAa,GAAGC,OAAO,CAACF,OAAO,CAACC,aAAa,CAAC;EAClD,IAAME,OAAO,GAAGH,OAAO,CAACG,OAAO,KAAK,KAAK;EAEzC,SAASC,MAAMA,CAACC,gBAAiC,EAAe;IAC5D,IAAIL,OAAO,CAACM,QAAQ,EAAE;MAClB,OAAOD,gBAAgB,CAACE,OAAO;IACnC;IAEA,IAAMC,IAAI,GAAGT,MAAM,CAACU,OAAO,CAACJ,gBAAgB,CAACE,OAAO,CAAC;IAErD,IAAIG,KAA8B;IAClC;IACA;IACA,IAAIF,IAAI,IAAIH,gBAAgB,CAACM,SAAS,KAAKC,SAAS,EAAE;MAClDF,KAAK,GAAGF,IAAI,CAACK,aAAa,CAACR,gBAAgB,CAACS,QAAS,CAAC;IAC1D;IAEA,IAAI,CAACJ,KAAK,IAAIA,KAAK,CAACK,MAAM,EAAE;MACxBL,KAAK,GAAG,IAAIf,WAAW,CAACU,gBAAgB,CAAC;IAC7C,CAAC,MAAM;MACH;MACAK,KAAK,CAACM,WAAW,CAAAC,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B","ignoreList":[]}
1
+ {"version":3,"file":"event-mapper.js","names":["MatrixEvent","MatrixEventEvent","RelationType","eventMapperFor","client","options","preventReEmit","Boolean","mapper","plainOldJsObject","toDevice","room_id","room","getRoom","event","state_key","undefined","findEventById","event_id","status","setUnsigned","_objectSpread","getUnsigned","unsigned","bundledEdit","getServerAggregatedRelation","Replace","content","replacement","makeReplaced","thread","findThreadForEvent","setThread","isEncrypted","reEmitter","reEmit","Decrypted","Replaced","VisibilityChange","BeforeRedaction"],"sources":["../src/event-mapper.ts"],"sourcesContent":["/*\nCopyright 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 { MatrixClient } from \"./client.ts\";\nimport { IEvent, MatrixEvent, MatrixEventEvent } from \"./models/event.ts\";\nimport { RelationType } from \"./@types/event.ts\";\n\nexport type EventMapper = (obj: Partial<IEvent>) => MatrixEvent;\n\nexport interface MapperOpts {\n // don't re-emit events emitted on an event mapped by this mapper on the client\n preventReEmit?: boolean;\n // decrypt event proactively\n decrypt?: boolean;\n // the event is a to_device event\n toDevice?: boolean;\n}\n\nexport function eventMapperFor(client: MatrixClient, options: MapperOpts): EventMapper {\n let preventReEmit = Boolean(options.preventReEmit);\n\n function mapper(plainOldJsObject: Partial<IEvent>): MatrixEvent {\n if (options.toDevice) {\n delete plainOldJsObject.room_id;\n }\n\n const room = client.getRoom(plainOldJsObject.room_id);\n\n let event: MatrixEvent | undefined;\n // If the event is already known to the room, let's re-use the model rather than duplicating.\n // We avoid doing this to state events as they may be forward or backwards looking which tweaks behaviour.\n if (room && plainOldJsObject.state_key === undefined) {\n event = room.findEventById(plainOldJsObject.event_id!);\n }\n\n if (!event || event.status) {\n event = new MatrixEvent(plainOldJsObject);\n } else {\n // merge the latest unsigned data from the server\n event.setUnsigned({ ...event.getUnsigned(), ...plainOldJsObject.unsigned });\n // prevent doubling up re-emitters\n preventReEmit = true;\n }\n\n // if there is a complete edit bundled alongside the event, perform the replacement.\n // (prior to MSC3925, events were automatically replaced on the server-side. MSC3925 proposes that that doesn't\n // happen automatically but the server does provide us with the whole content of the edit event.)\n const bundledEdit = event.getServerAggregatedRelation<Partial<IEvent>>(RelationType.Replace);\n if (bundledEdit?.content) {\n const replacement = mapper(bundledEdit);\n // XXX: it's worth noting that the spec says we should only respect encrypted edits if, once decrypted, the\n // replacement has a `m.new_content` property. The problem is that we haven't yet decrypted the replacement\n // (it should be happening in the background), so we can't enforce this. Possibly we should for decryption\n // to complete, but that sounds a bit racy. For now, we just assume it's ok.\n event.makeReplaced(replacement);\n }\n\n const thread = room?.findThreadForEvent(event);\n if (thread) {\n event.setThread(thread);\n }\n\n // TODO: once we get rid of the old libolm-backed crypto, we can restrict this to room events (rather than\n // to-device events), because the rust implementation decrypts to-device messages at a higher level.\n // Generally we probably want to use a different eventMapper implementation for to-device events because\n if (event.isEncrypted()) {\n if (!preventReEmit) {\n client.reEmitter.reEmit(event, [MatrixEventEvent.Decrypted]);\n }\n }\n\n if (!preventReEmit) {\n client.reEmitter.reEmit(event, [MatrixEventEvent.Replaced, MatrixEventEvent.VisibilityChange]);\n room?.reEmitter.reEmit(event, [MatrixEventEvent.BeforeRedaction]);\n }\n return event;\n }\n\n return mapper;\n}\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAAiBA,WAAW,EAAEC,gBAAgB,QAAQ,mBAAmB;AACzE,SAASC,YAAY,QAAQ,mBAAmB;AAahD,OAAO,SAASC,cAAcA,CAACC,MAAoB,EAAEC,OAAmB,EAAe;EACnF,IAAIC,aAAa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AC,CAAC,EAAE;MACrB,IAAI,CAAC3B,aAAa,EAAE;QAChBF,MAAM,CAAC8B,SAAS,CAACC,MAAM,CAACrB,KAAK,EAAE,CAACb,gBAAgB,CAACmC,SAAS,CAAC,CAAC;MAChE;IACJ;IAEA,IAAI,CAAC9B,aAAa,EAAE;MAChBF,MAAM,CAAC8B,SAAS,CAACC,MAAM,CAACrB,KAAK,EAAE,CAACb,gBAAgB,CAACoC,QAAQ,EAAEpC,gBAAgB,CAACqC,gBAAgB,CAAC,CAAC;MAC9F1B,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEsB,SAAS,CAACC,MAAM,CAACrB,KAAK,EAAE,CAACb,gBAAgB,CAACsC,eAAe,CAAC,CAAC;IACrE;IACA,OAAOzB,KAAK;EAChB;EAEA,OAAON,MAAM;AACjB","ignoreList":[]}
package/lib/matrix.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { WidgetApi } from "matrix-widget-api";
2
2
  import { MatrixClient, ICreateClientOpts } from "./client.ts";
3
3
  import { ICapabilities } from "./embedded.ts";
4
- import { CryptoStore } from "./crypto/store/base.ts";
5
4
  export * from "./client.ts";
6
5
  export * from "./serverCapabilities.ts";
7
6
  export * from "./embedded.ts";
@@ -31,10 +30,6 @@ export * from "./interactive-auth.ts";
31
30
  export * from "./service-types.ts";
32
31
  export * from "./store/memory.ts";
33
32
  export * from "./store/indexeddb.ts";
34
- export * from "./crypto/store/memory-crypto-store.ts";
35
- export * from "./crypto/store/localStorage-crypto-store.ts";
36
- export * from "./crypto/store/indexeddb-crypto-store.ts";
37
- export type { OutgoingRoomKeyRequest } from "./crypto/store/base.ts";
38
33
  export * from "./content-repo.ts";
39
34
  export type * from "./@types/common.ts";
40
35
  export type * from "./@types/uia.ts";
@@ -52,7 +47,6 @@ export * from "./@types/polls.ts";
52
47
  export type * from "./@types/local_notifications.ts";
53
48
  export type * from "./@types/registration.ts";
54
49
  export * from "./@types/read_receipts.ts";
55
- export type * from "./@types/crypto.ts";
56
50
  export * from "./@types/extensible_events.ts";
57
51
  export type * from "./@types/IIdentityServerProvider.ts";
58
52
  export * from "./@types/membership.ts";
@@ -60,20 +54,9 @@ export * from "./models/room-summary.ts";
60
54
  export * from "./models/event-status.ts";
61
55
  export type { RoomSummary } from "./client.ts";
62
56
  export * as ContentHelpers from "./content-helpers.ts";
63
- export * as SecretStorage from "./secret-storage.ts";
64
- export type { ICryptoCallbacks } from "./crypto/index.ts";
65
- export { createNewMatrixCall, CallEvent } from "./webrtc/call.ts";
66
- export type { MatrixCall } from "./webrtc/call.ts";
67
- export { GroupCall, GroupCallEvent, GroupCallIntent, GroupCallState, GroupCallType, GroupCallStatsReportEvent, } from "./webrtc/groupCall.ts";
68
- export {
69
- /** @deprecated Use {@link Crypto.CryptoEvent} instead */
70
- CryptoEvent, } from "./crypto/index.ts";
71
57
  export { SyncState, SetPresence } from "./sync.ts";
72
58
  export type { ISyncStateData as SyncStateData } from "./sync.ts";
73
59
  export { SlidingSyncEvent } from "./sliding-sync.ts";
74
- export { MediaHandlerEvent } from "./webrtc/mediaHandler.ts";
75
- export { CallFeedEvent } from "./webrtc/callFeed.ts";
76
- export { StatsReport } from "./webrtc/stats/statsReport.ts";
77
60
  export { Relations, RelationsEvent } from "./models/relations.ts";
78
61
  export { TypedEventEmitter } from "./models/typed-event-emitter.ts";
79
62
  export { LocalStorageErrors } from "./store/local-storage-events-emitter.ts";
@@ -81,14 +64,6 @@ export { IdentityProviderBrand, SSOAction } from "./@types/auth.ts";
81
64
  export type { ISSOFlow as SSOFlow, LoginFlow } from "./@types/auth.ts";
82
65
  export type { IHierarchyRelation as HierarchyRelation, IHierarchyRoom as HierarchyRoom } from "./@types/spaces.ts";
83
66
  export { LocationAssetType } from "./@types/location.ts";
84
- /** @deprecated Backwards-compatibility re-export. Import from `crypto-api` directly. */
85
- export * as Crypto from "./crypto-api/index.ts";
86
- /**
87
- * Configure a different factory to be used for creating crypto stores
88
- *
89
- * @param fac - a function which will return a new `CryptoStore`
90
- */
91
- export declare function setCryptoStoreFactory(fac: () => CryptoStore): void;
92
67
  /**
93
68
  * Construct a Matrix Client. Similar to {@link MatrixClient}
94
69
  * except that the 'request', 'store' and 'scheduler' dependencies are satisfied.
@@ -1 +1 @@
1
- {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../src/matrix.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAoB,aAAa,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uCAAuC,CAAC;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AAM,EAAE,MAAM,EACd,IAAI,EAAE,iBAAiB,EACvB,iBAAiB,UAAO,GACzB,YAAY,CAEd"}
package/lib/matrix.js CHANGED
@@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */
16
16
 
17
- import { MemoryCryptoStore } from "./crypto/store/memory-crypto-store.js";
18
17
  import { MemoryStore } from "./store/memory.js";
19
18
  import { MatrixScheduler } from "./scheduler.js";
20
19
  import { MatrixClient } from "./client.js";
@@ -48,9 +47,6 @@ export * from "./interactive-auth.js";
48
47
  export * from "./service-types.js";
49
48
  export * from "./store/memory.js";
50
49
  export * from "./store/indexeddb.js";
51
- export * from "./crypto/store/memory-crypto-store.js";
52
- export * from "./crypto/store/localStorage-crypto-store.js";
53
- export * from "./crypto/store/indexeddb-crypto-store.js";
54
50
  export * from "./content-repo.js";
55
51
  export * from "./@types/event.js";
56
52
  export * from "./@types/PushRules.js";
@@ -70,44 +66,19 @@ export * from "./models/room-summary.js";
70
66
  export * from "./models/event-status.js";
71
67
  import * as _ContentHelpers from "./content-helpers.js";
72
68
  export { _ContentHelpers as ContentHelpers };
73
- import * as _SecretStorage from "./secret-storage.js";
74
- export { _SecretStorage as SecretStorage };
75
- // used to be located here
76
- export { createNewMatrixCall, CallEvent } from "./webrtc/call.js";
77
- export { GroupCall, GroupCallEvent, GroupCallIntent, GroupCallState, GroupCallType, GroupCallStatsReportEvent } from "./webrtc/groupCall.js";
78
- export { /** @deprecated Use {@link Crypto.CryptoEvent} instead */
79
- CryptoEvent } from "./crypto/index.js";
80
69
  export { SyncState, SetPresence } from "./sync.js";
81
70
  export { SlidingSyncEvent } from "./sliding-sync.js";
82
- export { MediaHandlerEvent } from "./webrtc/mediaHandler.js";
83
- export { CallFeedEvent } from "./webrtc/callFeed.js";
84
- export { StatsReport } from "./webrtc/stats/statsReport.js";
85
71
  export { Relations, RelationsEvent } from "./models/relations.js";
86
72
  export { TypedEventEmitter } from "./models/typed-event-emitter.js";
87
73
  export { LocalStorageErrors } from "./store/local-storage-events-emitter.js";
88
74
  export { IdentityProviderBrand, SSOAction } from "./@types/auth.js";
89
75
  export { LocationAssetType } from "./@types/location.js";
90
-
91
- /** @deprecated Backwards-compatibility re-export. Import from `crypto-api` directly. */
92
- import * as _Crypto from "./crypto-api/index.js";
93
- export { _Crypto as Crypto };
94
- var cryptoStoreFactory = () => new MemoryCryptoStore();
95
-
96
- /**
97
- * Configure a different factory to be used for creating crypto stores
98
- *
99
- * @param fac - a function which will return a new `CryptoStore`
100
- */
101
- export function setCryptoStoreFactory(fac) {
102
- cryptoStoreFactory = fac;
103
- }
104
76
  function amendClientOpts(opts) {
105
- var _opts$store, _opts$scheduler, _opts$cryptoStore;
77
+ var _opts$store, _opts$scheduler;
106
78
  opts.store = (_opts$store = opts.store) !== null && _opts$store !== void 0 ? _opts$store : new MemoryStore({
107
79
  localStorage: globalThis.localStorage
108
80
  });
109
81
  opts.scheduler = (_opts$scheduler = opts.scheduler) !== null && _opts$scheduler !== void 0 ? _opts$scheduler : new MatrixScheduler();
110
- opts.cryptoStore = (_opts$cryptoStore = opts.cryptoStore) !== null && _opts$cryptoStore !== void 0 ? _opts$cryptoStore : cryptoStoreFactory();
111
82
  return opts;
112
83
  }
113
84
 
package/lib/matrix.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"matrix.js","names":["MemoryCryptoStore","MemoryStore","MatrixScheduler","MatrixClient","RoomWidgetClient","_ContentHelpers","ContentHelpers","_SecretStorage","SecretStorage","createNewMatrixCall","CallEvent","GroupCall","GroupCallEvent","GroupCallIntent","GroupCallState","GroupCallType","GroupCallStatsReportEvent","CryptoEvent","SyncState","SetPresence","SlidingSyncEvent","MediaHandlerEvent","CallFeedEvent","StatsReport","Relations","RelationsEvent","TypedEventEmitter","LocalStorageErrors","IdentityProviderBrand","SSOAction","LocationAssetType","_Crypto","Crypto","cryptoStoreFactory","setCryptoStoreFactory","fac","amendClientOpts","opts","_opts$store","_opts$scheduler","_opts$cryptoStore","store","localStorage","globalThis","scheduler","cryptoStore","createClient","createRoomWidgetClient","widgetApi","capabilities","roomId","sendContentLoaded","arguments","length","undefined"],"sources":["../src/matrix.ts"],"sourcesContent":["/*\nCopyright 2015-2022 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 { WidgetApi } from \"matrix-widget-api\";\n\nimport { MemoryCryptoStore } from \"./crypto/store/memory-crypto-store.ts\";\nimport { MemoryStore } from \"./store/memory.ts\";\nimport { MatrixScheduler } from \"./scheduler.ts\";\nimport { MatrixClient, ICreateClientOpts } from \"./client.ts\";\nimport { RoomWidgetClient, ICapabilities } from \"./embedded.ts\";\nimport { CryptoStore } from \"./crypto/store/base.ts\";\n\nexport * from \"./client.ts\";\nexport * from \"./serverCapabilities.ts\";\nexport * from \"./embedded.ts\";\nexport * from \"./http-api/index.ts\";\nexport * from \"./autodiscovery.ts\";\nexport * from \"./sync-accumulator.ts\";\nexport * from \"./errors.ts\";\nexport * from \"./base64.ts\";\nexport * from \"./models/beacon.ts\";\nexport * from \"./models/event.ts\";\nexport * from \"./models/room.ts\";\nexport * from \"./models/event-timeline.ts\";\nexport * from \"./models/event-timeline-set.ts\";\nexport * from \"./models/poll.ts\";\nexport * from \"./models/room-member.ts\";\nexport * from \"./models/room-state.ts\";\nexport * from \"./models/thread.ts\";\nexport * from \"./models/typed-event-emitter.ts\";\nexport * from \"./models/user.ts\";\nexport * from \"./models/device.ts\";\nexport * from \"./models/search-result.ts\";\nexport * from \"./oidc/index.ts\";\nexport * from \"./scheduler.ts\";\nexport * from \"./filter.ts\";\nexport * from \"./timeline-window.ts\";\nexport * from \"./interactive-auth.ts\";\nexport * from \"./service-types.ts\";\nexport * from \"./store/memory.ts\";\nexport * from \"./store/indexeddb.ts\";\nexport * from \"./crypto/store/memory-crypto-store.ts\";\nexport * from \"./crypto/store/localStorage-crypto-store.ts\";\nexport * from \"./crypto/store/indexeddb-crypto-store.ts\";\nexport type { OutgoingRoomKeyRequest } from \"./crypto/store/base.ts\";\nexport * from \"./content-repo.ts\";\nexport type * from \"./@types/common.ts\";\nexport type * from \"./@types/uia.ts\";\nexport * from \"./@types/event.ts\";\nexport * from \"./@types/PushRules.ts\";\nexport * from \"./@types/partials.ts\";\nexport * from \"./@types/requests.ts\";\nexport * from \"./@types/search.ts\";\nexport * from \"./@types/beacon.ts\";\nexport * from \"./@types/topic.ts\";\nexport * from \"./@types/location.ts\";\nexport * from \"./@types/threepids.ts\";\nexport * from \"./@types/auth.ts\";\nexport * from \"./@types/polls.ts\";\nexport type * from \"./@types/local_notifications.ts\";\nexport type * from \"./@types/registration.ts\";\nexport * from \"./@types/read_receipts.ts\";\nexport type * from \"./@types/crypto.ts\";\nexport * from \"./@types/extensible_events.ts\";\nexport type * from \"./@types/IIdentityServerProvider.ts\";\nexport * from \"./@types/membership.ts\";\nexport * from \"./models/room-summary.ts\";\nexport * from \"./models/event-status.ts\";\nexport type { RoomSummary } from \"./client.ts\";\nexport * as ContentHelpers from \"./content-helpers.ts\";\nexport * as SecretStorage from \"./secret-storage.ts\";\nexport type { ICryptoCallbacks } from \"./crypto/index.ts\"; // used to be located here\nexport { createNewMatrixCall, CallEvent } from \"./webrtc/call.ts\";\nexport type { MatrixCall } from \"./webrtc/call.ts\";\nexport {\n GroupCall,\n GroupCallEvent,\n GroupCallIntent,\n GroupCallState,\n GroupCallType,\n GroupCallStatsReportEvent,\n} from \"./webrtc/groupCall.ts\";\n\nexport {\n /** @deprecated Use {@link Crypto.CryptoEvent} instead */\n CryptoEvent,\n} from \"./crypto/index.ts\";\nexport { SyncState, SetPresence } from \"./sync.ts\";\nexport type { ISyncStateData as SyncStateData } from \"./sync.ts\";\nexport { SlidingSyncEvent } from \"./sliding-sync.ts\";\nexport { MediaHandlerEvent } from \"./webrtc/mediaHandler.ts\";\nexport { CallFeedEvent } from \"./webrtc/callFeed.ts\";\nexport { StatsReport } from \"./webrtc/stats/statsReport.ts\";\nexport { Relations, RelationsEvent } from \"./models/relations.ts\";\nexport { TypedEventEmitter } from \"./models/typed-event-emitter.ts\";\nexport { LocalStorageErrors } from \"./store/local-storage-events-emitter.ts\";\nexport { IdentityProviderBrand, SSOAction } from \"./@types/auth.ts\";\nexport type { ISSOFlow as SSOFlow, LoginFlow } from \"./@types/auth.ts\";\nexport type { IHierarchyRelation as HierarchyRelation, IHierarchyRoom as HierarchyRoom } from \"./@types/spaces.ts\";\nexport { LocationAssetType } from \"./@types/location.ts\";\n\n/** @deprecated Backwards-compatibility re-export. Import from `crypto-api` directly. */\nexport * as Crypto from \"./crypto-api/index.ts\";\n\nlet cryptoStoreFactory = (): CryptoStore => new MemoryCryptoStore();\n\n/**\n * Configure a different factory to be used for creating crypto stores\n *\n * @param fac - a function which will return a new `CryptoStore`\n */\nexport function setCryptoStoreFactory(fac: () => CryptoStore): void {\n cryptoStoreFactory = fac;\n}\n\nfunction amendClientOpts(opts: ICreateClientOpts): ICreateClientOpts {\n opts.store =\n opts.store ??\n new MemoryStore({\n localStorage: globalThis.localStorage,\n });\n opts.scheduler = opts.scheduler ?? new MatrixScheduler();\n opts.cryptoStore = opts.cryptoStore ?? cryptoStoreFactory();\n\n return opts;\n}\n\n/**\n * Construct a Matrix Client. Similar to {@link MatrixClient}\n * except that the 'request', 'store' and 'scheduler' dependencies are satisfied.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link MatrixClient}.\n *\n * @returns A new matrix client.\n * @see {@link MatrixClient} for the full list of options for\n * `opts`.\n */\nexport function createClient(opts: ICreateClientOpts): MatrixClient {\n return new MatrixClient(amendClientOpts(opts));\n}\n\n/**\n * Construct a Matrix Client that works in a widget.\n * This client has a subset of features compared to a full client.\n * It uses the widget-api to communicate with matrix. (widget \\<-\\> client \\<-\\> homeserver)\n * @returns A new matrix client with a subset of features.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link MatrixClient}.\n * @param widgetApi - The widget api to use for communication.\n * @param capabilities - The capabilities the widget client will request.\n * @param roomId - The room id the widget is associated with.\n * @param sendContentLoaded - Whether to send a content loaded widget action immediately after initial setup.\n * Set to `false` if the widget uses `waitForIFrameLoad=true` (in this case the client does not expect a content loaded action at all),\n * or if the the widget wants to send the `ContentLoaded` action at a later point in time after the initial setup.\n */\nexport function createRoomWidgetClient(\n widgetApi: WidgetApi,\n capabilities: ICapabilities,\n roomId: string,\n opts: ICreateClientOpts,\n sendContentLoaded = true,\n): MatrixClient {\n return new RoomWidgetClient(widgetApi, capabilities, roomId, amendClientOpts(opts), sendContentLoaded);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,eAAe,QAAQ,gBAAgB;AAChD,SAASC,YAAY,QAA2B,aAAa;AAC7D,SAASC,gBAAgB,QAAuB,eAAe;AAG/D,cAAc,aAAa;AAC3B,cAAc,yBAAyB;AACvC,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,4BAA4B;AAC1C,cAAc,gCAAgC;AAC9C,cAAc,kBAAkB;AAChC,cAAc,yBAAyB;AACvC,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,iCAAiC;AAC/C,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,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SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAExB,OAAO,IAAIhD,gBAAgB,CAAC4C,SAAS,EAAEC,YAAY,EAAEC,MAAM,EAAEd,eAAe,CAACC,IAAI,CAAC,EAAEc,iBAAiB,CAAC;AAC1G","ignoreList":[]}
1
+ {"version":3,"file":"matrix.js","names":["MemoryStore","MatrixScheduler","MatrixClient","RoomWidgetClient","_ContentHelpers","ContentHelpers","SyncState","SetPresence","SlidingSyncEvent","Relations","RelationsEvent","TypedEventEmitter","LocalStorageErrors","IdentityProviderBrand","SSOAction","LocationAssetType","amendClientOpts","opts","_opts$store","_opts$scheduler","store","localStorage","globalThis","scheduler","createClient","createRoomWidgetClient","widgetApi","capabilities","roomId","sendContentLoaded","arguments","length","undefined"],"sources":["../src/matrix.ts"],"sourcesContent":["/*\nCopyright 2015-2022 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 { WidgetApi } from \"matrix-widget-api\";\n\nimport { MemoryStore } from \"./store/memory.ts\";\nimport { MatrixScheduler } from \"./scheduler.ts\";\nimport { MatrixClient, ICreateClientOpts } from \"./client.ts\";\nimport { RoomWidgetClient, ICapabilities } from \"./embedded.ts\";\n\nexport * from \"./client.ts\";\nexport * from \"./serverCapabilities.ts\";\nexport * from \"./embedded.ts\";\nexport * from \"./http-api/index.ts\";\nexport * from \"./autodiscovery.ts\";\nexport * from \"./sync-accumulator.ts\";\nexport * from \"./errors.ts\";\nexport * from \"./base64.ts\";\nexport * from \"./models/beacon.ts\";\nexport * from \"./models/event.ts\";\nexport * from \"./models/room.ts\";\nexport * from \"./models/event-timeline.ts\";\nexport * from \"./models/event-timeline-set.ts\";\nexport * from \"./models/poll.ts\";\nexport * from \"./models/room-member.ts\";\nexport * from \"./models/room-state.ts\";\nexport * from \"./models/thread.ts\";\nexport * from \"./models/typed-event-emitter.ts\";\nexport * from \"./models/user.ts\";\nexport * from \"./models/device.ts\";\nexport * from \"./models/search-result.ts\";\nexport * from \"./oidc/index.ts\";\nexport * from \"./scheduler.ts\";\nexport * from \"./filter.ts\";\nexport * from \"./timeline-window.ts\";\nexport * from \"./interactive-auth.ts\";\nexport * from \"./service-types.ts\";\nexport * from \"./store/memory.ts\";\nexport * from \"./store/indexeddb.ts\";\nexport * from \"./content-repo.ts\";\nexport type * from \"./@types/common.ts\";\nexport type * from \"./@types/uia.ts\";\nexport * from \"./@types/event.ts\";\nexport * from \"./@types/PushRules.ts\";\nexport * from \"./@types/partials.ts\";\nexport * from \"./@types/requests.ts\";\nexport * from \"./@types/search.ts\";\nexport * from \"./@types/beacon.ts\";\nexport * from \"./@types/topic.ts\";\nexport * from \"./@types/location.ts\";\nexport * from \"./@types/threepids.ts\";\nexport * from \"./@types/auth.ts\";\nexport * from \"./@types/polls.ts\";\nexport type * from \"./@types/local_notifications.ts\";\nexport type * from \"./@types/registration.ts\";\nexport * from \"./@types/read_receipts.ts\";\nexport * from \"./@types/extensible_events.ts\";\nexport type * from \"./@types/IIdentityServerProvider.ts\";\nexport * from \"./@types/membership.ts\";\nexport * from \"./models/room-summary.ts\";\nexport * from \"./models/event-status.ts\";\nexport type { RoomSummary } from \"./client.ts\";\nexport * as ContentHelpers from \"./content-helpers.ts\";\n\nexport { SyncState, SetPresence } from \"./sync.ts\";\nexport type { ISyncStateData as SyncStateData } from \"./sync.ts\";\nexport { SlidingSyncEvent } from \"./sliding-sync.ts\";\nexport { Relations, RelationsEvent } from \"./models/relations.ts\";\nexport { TypedEventEmitter } from \"./models/typed-event-emitter.ts\";\nexport { LocalStorageErrors } from \"./store/local-storage-events-emitter.ts\";\nexport { IdentityProviderBrand, SSOAction } from \"./@types/auth.ts\";\nexport type { ISSOFlow as SSOFlow, LoginFlow } from \"./@types/auth.ts\";\nexport type { IHierarchyRelation as HierarchyRelation, IHierarchyRoom as HierarchyRoom } from \"./@types/spaces.ts\";\nexport { LocationAssetType } from \"./@types/location.ts\";\n\nfunction amendClientOpts(opts: ICreateClientOpts): ICreateClientOpts {\n opts.store =\n opts.store ??\n new MemoryStore({\n localStorage: globalThis.localStorage,\n });\n opts.scheduler = opts.scheduler ?? new MatrixScheduler();\n\n return opts;\n}\n\n/**\n * Construct a Matrix Client. Similar to {@link MatrixClient}\n * except that the 'request', 'store' and 'scheduler' dependencies are satisfied.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link MatrixClient}.\n *\n * @returns A new matrix client.\n * @see {@link MatrixClient} for the full list of options for\n * `opts`.\n */\nexport function createClient(opts: ICreateClientOpts): MatrixClient {\n return new MatrixClient(amendClientOpts(opts));\n}\n\n/**\n * Construct a Matrix Client that works in a widget.\n * This client has a subset of features compared to a full client.\n * It uses the widget-api to communicate with matrix. (widget \\<-\\> client \\<-\\> homeserver)\n * @returns A new matrix client with a subset of features.\n * @param opts - The configuration options for this client. These configuration\n * options will be passed directly to {@link MatrixClient}.\n * @param widgetApi - The widget api to use for communication.\n * @param capabilities - The capabilities the widget client will request.\n * @param roomId - The room id the widget is associated with.\n * @param sendContentLoaded - Whether to send a content loaded widget action immediately after initial setup.\n * Set to `false` if the widget uses `waitForIFrameLoad=true` (in this case the client does not expect a content loaded action at all),\n * or if the the widget wants to send the `ContentLoaded` action at a later point in time after the initial setup.\n */\nexport function createRoomWidgetClient(\n widgetApi: WidgetApi,\n capabilities: ICapabilities,\n roomId: string,\n opts: ICreateClientOpts,\n sendContentLoaded = true,\n): MatrixClient {\n return new RoomWidgetClient(widgetApi, capabilities, roomId, amendClientOpts(opts), sendContentLoaded);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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  event = room.getUnfilteredTimelineSet().findEventById(_this5.id);
157
157
  }
158
158
  if (!event) throw new Error("Failed to find event");
159
-
160
- // Sometimes the event isn't decrypted for us, so do that.
161
- yield _this5.client.decryptEventIfNeeded(event);
162
159
  return event;
163
160
  })();
164
161
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MSC3089Branch.js","names":["RelationType","UNSTABLE_MSC3089_BRANCH","EventTimeline","MSC3089Branch","constructor","client","indexEvent","directory","id","stateKey","getStateKey","Error","isActive","getContent","version","_this$indexEvent$getC","roomId","getRoomId","delete","_this","_asyncToGenerator","sendStateEvent","name","redactEvent","nextVersion","getVersionHistory","getName","setName","_this2","_objectSpread","isLocked","setLocked","locked","_this3","getFileInfo","_this4","event","getFileEvent","file","getOriginalContent","httpUrl","mxcUrlToHttp","concat","info","_this5","room","getRoom","getUnfilteredTimelineSet","findEventById","getLiveTimeline","getState","BACKWARDS","paginationToken","scrollback","decryptEventIfNeeded","createNewVersion","encryptedContents","additionalContent","_this6","fileEventResponse","createFile","rel_type","Replace","event_id","active","_this7","fileHistory","push","timelineEvents","getEvents","reverse","childEvent","parentEvent","find","e","replacingEventId","getId","branch","getFile"],"sources":["../../src/models/MSC3089Branch.ts"],"sourcesContent":["/*\nCopyright 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 { MatrixClient } from \"../client.ts\";\nimport { RelationType, UNSTABLE_MSC3089_BRANCH } from \"../@types/event.ts\";\nimport { IContent, MatrixEvent } from \"./event.ts\";\nimport { MSC3089TreeSpace } from \"./MSC3089TreeSpace.ts\";\nimport { EventTimeline } from \"./event-timeline.ts\";\nimport { FileType } from \"../http-api/index.ts\";\nimport type { ISendEventResponse } from \"../@types/requests.ts\";\nimport { EncryptedFile } from \"../@types/media.ts\";\n\nexport interface MSC3089EventContent {\n active?: boolean;\n name?: string;\n locked?: boolean;\n version?: number;\n}\n\nexport interface MSC3089EventContent {\n active?: boolean;\n name?: string;\n locked?: boolean;\n version?: number;\n}\n\n/**\n * Represents a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) branch - a reference\n * to a file (leaf) in the tree. Note that this is UNSTABLE and subject to breaking changes\n * without notice.\n */\nexport class MSC3089Branch {\n public constructor(\n private client: MatrixClient,\n public readonly indexEvent: MatrixEvent,\n public readonly directory: MSC3089TreeSpace,\n ) {\n // Nothing to do\n }\n\n /**\n * The file ID.\n */\n public get id(): string {\n const stateKey = this.indexEvent.getStateKey();\n if (!stateKey) {\n throw new Error(\"State key not found for branch\");\n }\n return stateKey;\n }\n\n /**\n * Whether this branch is active/valid.\n */\n public get isActive(): boolean {\n return this.indexEvent.getContent()[\"active\"] === true;\n }\n\n /**\n * Version for the file, one-indexed.\n */\n public get version(): number {\n return this.indexEvent.getContent()[\"version\"] ?? 1;\n }\n\n private get roomId(): string {\n return this.indexEvent.getRoomId()!;\n }\n\n /**\n * Deletes the file from the tree, including all prior edits/versions.\n * @returns Promise which resolves when complete.\n */\n public async delete(): Promise<void> {\n await this.client.sendStateEvent(this.roomId, UNSTABLE_MSC3089_BRANCH.name, {}, this.id);\n await this.client.redactEvent(this.roomId, this.id);\n\n const nextVersion = (await this.getVersionHistory())[1]; // [0] will be us\n if (nextVersion) await nextVersion.delete(); // implicit recursion\n }\n\n /**\n * Gets the name for this file.\n * @returns The name, or \"Unnamed File\" if unknown.\n */\n public getName(): string {\n return this.indexEvent.getContent()[\"name\"] || \"Unnamed File\";\n }\n\n /**\n * Sets the name for this file.\n * @param name - The new name for this file.\n * @returns Promise which resolves when complete.\n */\n public async setName(name: string): Promise<void> {\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n ...this.indexEvent.getContent(),\n name: name,\n },\n this.id,\n );\n }\n\n /**\n * Gets whether or not a file is locked.\n * @returns True if locked, false otherwise.\n */\n public isLocked(): boolean {\n return this.indexEvent.getContent()[\"locked\"] || false;\n }\n\n /**\n * Sets a file as locked or unlocked.\n * @param locked - True to lock the file, false otherwise.\n * @returns Promise which resolves when complete.\n */\n public async setLocked(locked: boolean): Promise<void> {\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n ...this.indexEvent.getContent(),\n locked: locked,\n },\n this.id,\n );\n }\n\n /**\n * Gets information about the file needed to download it.\n * @returns Information about the file.\n */\n public async getFileInfo(): Promise<{ info: EncryptedFile; httpUrl: string }> {\n const event = await this.getFileEvent();\n\n const file = event.getOriginalContent()[\"file\"];\n const httpUrl = this.client.mxcUrlToHttp(file[\"url\"]);\n\n if (!httpUrl) {\n throw new Error(`No HTTP URL available for ${file[\"url\"]}`);\n }\n\n return { info: file, httpUrl: httpUrl };\n }\n\n /**\n * Gets the event the file points to.\n * @returns Promise which resolves to the file's event.\n */\n public async getFileEvent(): Promise<MatrixEvent> {\n const room = this.client.getRoom(this.roomId);\n if (!room) throw new Error(\"Unknown room\");\n\n let event: MatrixEvent | undefined = room.getUnfilteredTimelineSet().findEventById(this.id);\n\n // keep scrolling back if needed until we find the event or reach the start of the room:\n while (!event && room.getLiveTimeline().getState(EventTimeline.BACKWARDS)!.paginationToken) {\n await this.client.scrollback(room, 100);\n event = room.getUnfilteredTimelineSet().findEventById(this.id);\n }\n\n if (!event) throw new Error(\"Failed to find event\");\n\n // Sometimes the event isn't decrypted for us, so do that.\n await this.client.decryptEventIfNeeded(event);\n\n return event;\n }\n\n /**\n * Creates a new version of this file with contents in a type that is compatible with MatrixClient.uploadContent().\n * @param name - The name of the file.\n * @param encryptedContents - The encrypted contents.\n * @param info - The encrypted file information.\n * @param additionalContent - Optional event content fields to include in the message.\n * @returns Promise which resolves to the file event's sent response.\n */\n public async createNewVersion(\n name: string,\n encryptedContents: FileType,\n info: EncryptedFile,\n additionalContent?: IContent,\n ): Promise<ISendEventResponse> {\n const fileEventResponse = await this.directory.createFile(name, encryptedContents, info, {\n ...(additionalContent ?? {}),\n \"m.new_content\": true,\n \"m.relates_to\": {\n rel_type: RelationType.Replace,\n event_id: this.id,\n },\n });\n\n // Update the version of the new event\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n active: true,\n name: name,\n version: this.version + 1,\n },\n fileEventResponse[\"event_id\"],\n );\n\n // Deprecate ourselves\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n ...this.indexEvent.getContent(),\n active: false,\n },\n this.id,\n );\n\n return fileEventResponse;\n }\n\n /**\n * Gets the file's version history, starting at this file.\n * @returns Promise which resolves to the file's version history, with the\n * first element being the current version and the last element being the first version.\n */\n public async getVersionHistory(): Promise<MSC3089Branch[]> {\n const fileHistory: MSC3089Branch[] = [];\n fileHistory.push(this); // start with ourselves\n\n const room = this.client.getRoom(this.roomId);\n if (!room) throw new Error(\"Invalid or unknown room\");\n\n // Clone the timeline to reverse it, getting most-recent-first ordering, hopefully\n // shortening the awful loop below. Without the clone, we can unintentionally mutate\n // the timeline.\n const timelineEvents = [...room.getLiveTimeline().getEvents()].reverse();\n\n // XXX: This is a very inefficient search, but it's the best we can do with the\n // relations structure we have in the SDK. As of writing, it is not worth the\n // investment in improving the structure.\n let childEvent: MatrixEvent | undefined;\n let parentEvent = await this.getFileEvent();\n do {\n childEvent = timelineEvents.find((e) => e.replacingEventId() === parentEvent.getId());\n if (childEvent) {\n const branch = this.directory.getFile(childEvent.getId()!);\n if (branch) {\n fileHistory.push(branch);\n parentEvent = childEvent;\n } else {\n break; // prevent infinite loop\n }\n }\n } while (childEvent);\n\n return fileHistory;\n }\n}\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;A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","EventTimeline","MSC3089Branch","constructor","client","indexEvent","directory","id","stateKey","getStateKey","Error","isActive","getContent","version","_this$indexEvent$getC","roomId","getRoomId","delete","_this","_asyncToGenerator","sendStateEvent","name","redactEvent","nextVersion","getVersionHistory","getName","setName","_this2","_objectSpread","isLocked","setLocked","locked","_this3","getFileInfo","_this4","event","getFileEvent","file","getOriginalContent","httpUrl","mxcUrlToHttp","concat","info","_this5","room","getRoom","getUnfilteredTimelineSet","findEventById","getLiveTimeline","getState","BACKWARDS","paginationToken","scrollback","createNewVersion","encryptedContents","additionalContent","_this6","fileEventResponse","createFile","rel_type","Replace","event_id","active","_this7","fileHistory","push","timelineEvents","getEvents","reverse","childEvent","parentEvent","find","e","replacingEventId","getId","branch","getFile"],"sources":["../../src/models/MSC3089Branch.ts"],"sourcesContent":["/*\nCopyright 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 { MatrixClient } from \"../client.ts\";\nimport { RelationType, UNSTABLE_MSC3089_BRANCH } from \"../@types/event.ts\";\nimport { IContent, MatrixEvent } from \"./event.ts\";\nimport { MSC3089TreeSpace } from \"./MSC3089TreeSpace.ts\";\nimport { EventTimeline } from \"./event-timeline.ts\";\nimport { FileType } from \"../http-api/index.ts\";\nimport type { ISendEventResponse } from \"../@types/requests.ts\";\nimport { EncryptedFile } from \"../@types/media.ts\";\n\nexport interface MSC3089EventContent {\n active?: boolean;\n name?: string;\n locked?: boolean;\n version?: number;\n}\n\nexport interface MSC3089EventContent {\n active?: boolean;\n name?: string;\n locked?: boolean;\n version?: number;\n}\n\n/**\n * Represents a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) branch - a reference\n * to a file (leaf) in the tree. Note that this is UNSTABLE and subject to breaking changes\n * without notice.\n */\nexport class MSC3089Branch {\n public constructor(\n private client: MatrixClient,\n public readonly indexEvent: MatrixEvent,\n public readonly directory: MSC3089TreeSpace,\n ) {\n // Nothing to do\n }\n\n /**\n * The file ID.\n */\n public get id(): string {\n const stateKey = this.indexEvent.getStateKey();\n if (!stateKey) {\n throw new Error(\"State key not found for branch\");\n }\n return stateKey;\n }\n\n /**\n * Whether this branch is active/valid.\n */\n public get isActive(): boolean {\n return this.indexEvent.getContent()[\"active\"] === true;\n }\n\n /**\n * Version for the file, one-indexed.\n */\n public get version(): number {\n return this.indexEvent.getContent()[\"version\"] ?? 1;\n }\n\n private get roomId(): string {\n return this.indexEvent.getRoomId()!;\n }\n\n /**\n * Deletes the file from the tree, including all prior edits/versions.\n * @returns Promise which resolves when complete.\n */\n public async delete(): Promise<void> {\n await this.client.sendStateEvent(this.roomId, UNSTABLE_MSC3089_BRANCH.name, {}, this.id);\n await this.client.redactEvent(this.roomId, this.id);\n\n const nextVersion = (await this.getVersionHistory())[1]; // [0] will be us\n if (nextVersion) await nextVersion.delete(); // implicit recursion\n }\n\n /**\n * Gets the name for this file.\n * @returns The name, or \"Unnamed File\" if unknown.\n */\n public getName(): string {\n return this.indexEvent.getContent()[\"name\"] || \"Unnamed File\";\n }\n\n /**\n * Sets the name for this file.\n * @param name - The new name for this file.\n * @returns Promise which resolves when complete.\n */\n public async setName(name: string): Promise<void> {\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n ...this.indexEvent.getContent(),\n name: name,\n },\n this.id,\n );\n }\n\n /**\n * Gets whether or not a file is locked.\n * @returns True if locked, false otherwise.\n */\n public isLocked(): boolean {\n return this.indexEvent.getContent()[\"locked\"] || false;\n }\n\n /**\n * Sets a file as locked or unlocked.\n * @param locked - True to lock the file, false otherwise.\n * @returns Promise which resolves when complete.\n */\n public async setLocked(locked: boolean): Promise<void> {\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n ...this.indexEvent.getContent(),\n locked: locked,\n },\n this.id,\n );\n }\n\n /**\n * Gets information about the file needed to download it.\n * @returns Information about the file.\n */\n public async getFileInfo(): Promise<{ info: EncryptedFile; httpUrl: string }> {\n const event = await this.getFileEvent();\n\n const file = event.getOriginalContent()[\"file\"];\n const httpUrl = this.client.mxcUrlToHttp(file[\"url\"]);\n\n if (!httpUrl) {\n throw new Error(`No HTTP URL available for ${file[\"url\"]}`);\n }\n\n return { info: file, httpUrl: httpUrl };\n }\n\n /**\n * Gets the event the file points to.\n * @returns Promise which resolves to the file's event.\n */\n public async getFileEvent(): Promise<MatrixEvent> {\n const room = this.client.getRoom(this.roomId);\n if (!room) throw new Error(\"Unknown room\");\n\n let event: MatrixEvent | undefined = room.getUnfilteredTimelineSet().findEventById(this.id);\n\n // keep scrolling back if needed until we find the event or reach the start of the room:\n while (!event && room.getLiveTimeline().getState(EventTimeline.BACKWARDS)!.paginationToken) {\n await this.client.scrollback(room, 100);\n event = room.getUnfilteredTimelineSet().findEventById(this.id);\n }\n\n if (!event) throw new Error(\"Failed to find event\");\n\n return event;\n }\n\n /**\n * Creates a new version of this file with contents in a type that is compatible with MatrixClient.uploadContent().\n * @param name - The name of the file.\n * @param encryptedContents - The encrypted contents.\n * @param info - The encrypted file information.\n * @param additionalContent - Optional event content fields to include in the message.\n * @returns Promise which resolves to the file event's sent response.\n */\n public async createNewVersion(\n name: string,\n encryptedContents: FileType,\n info: EncryptedFile,\n additionalContent?: IContent,\n ): Promise<ISendEventResponse> {\n const fileEventResponse = await this.directory.createFile(name, encryptedContents, info, {\n ...(additionalContent ?? {}),\n \"m.new_content\": true,\n \"m.relates_to\": {\n rel_type: RelationType.Replace,\n event_id: this.id,\n },\n });\n\n // Update the version of the new event\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n active: true,\n name: name,\n version: this.version + 1,\n },\n fileEventResponse[\"event_id\"],\n );\n\n // Deprecate ourselves\n await this.client.sendStateEvent(\n this.roomId,\n UNSTABLE_MSC3089_BRANCH.name,\n {\n ...this.indexEvent.getContent(),\n active: false,\n },\n this.id,\n );\n\n return fileEventResponse;\n }\n\n /**\n * Gets the file's version history, starting at this file.\n * @returns Promise which resolves to the file's version history, with the\n * first element being the current version and the last element being the first version.\n */\n public async getVersionHistory(): Promise<MSC3089Branch[]> {\n const fileHistory: MSC3089Branch[] = [];\n fileHistory.push(this); // start with ourselves\n\n const room = this.client.getRoom(this.roomId);\n if (!room) throw new Error(\"Invalid or unknown room\");\n\n // Clone the timeline to reverse it, getting most-recent-first ordering, hopefully\n // shortening the awful loop below. Without the clone, we can unintentionally mutate\n // the timeline.\n const timelineEvents = [...room.getLiveTimeline().getEvents()].reverse();\n\n // XXX: This is a very inefficient search, but it's the best we can do with the\n // relations structure we have in the SDK. As of writing, it is not worth the\n // investment in improving the structure.\n let childEvent: MatrixEvent | undefined;\n let parentEvent = await this.getFileEvent();\n do {\n childEvent = timelineEvents.find((e) => e.replacingEventId() === parentEvent.getId());\n if (childEvent) {\n const branch = this.directory.getFile(childEvent.getId()!);\n if (branch) {\n fileHistory.push(branch);\n parentEvent = childEvent;\n } else {\n break; // prevent infinite loop\n }\n }\n } while (childEvent);\n\n return fileHistory;\n }\n}\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,YAAY,EAAEC,uBAAuB,QAAQ,oBAAoB;AAG1E,SAASC,aAAa,QAAQ,qBAAqB;AAmBnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,CAAC;EAChBC,WAAWA,CACNC,MAAoB,EACZC,UAAuB,EACvBC,SAA2B,EAC7C;IAAA,KAHUF,MAAoB,GAApBA,MAAoB;IAAA,KACZC,UAAuB,GAAvBA,UAAuB;IAAA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E,MAAM,IAAIlC,KAAK,CAAC,yBAAyB,CAAC;;MAErD;MACA;MACA;MACA,IAAMwD,cAAc,GAAG,CAAC,GAAGtB,IAAI,CAACI,eAAe,CAAC,CAAC,CAACmB,SAAS,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;;MAExE;MACA;MACA;MACA,IAAIC,UAAmC;MACvC,IAAIC,WAAW,SAASP,MAAI,CAAC3B,YAAY,CAAC,CAAC;MAC3C,GAAG;QACCiC,UAAU,GAAGH,cAAc,CAACK,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,gBAAgB,CAAC,CAAC,KAAKH,WAAW,CAACI,KAAK,CAAC,CAAC,CAAC;QACrF,IAAIL,UAAU,EAAE;UACZ,IAAMM,MAAM,GAAGZ,MAAI,CAACzD,SAAS,CAACsE,OAAO,CAACP,UAAU,CAACK,KAAK,CAAC,CAAE,CAAC;UAC1D,IAAIC,MAAM,EAAE;YACRX,WAAW,CAACC,IAAI,CAACU,MAAM,CAAC;YACxBL,WAAW,GAAGD,UAAU;UAC5B,CAAC,MAAM;YACH,MAAM,CAAC;UACX;QACJ;MACJ,CAAC,QAAQA,UAAU;MAEnB,OAAOL,WAAW;IAAC;EACvB;AACJ","ignoreList":[]}
@@ -3,20 +3,16 @@
3
3
  * the public classes.
4
4
  */
5
5
  import { ExtensibleEvent, Optional } from "matrix-events-sdk";
6
- import { VerificationRequest } from "../crypto/verification/request/VerificationRequest.ts";
7
6
  import { EventType, MsgType, RelationType, UNSIGNED_THREAD_ID_FIELD } from "../@types/event.ts";
8
- import { Crypto } from "../crypto/index.ts";
9
7
  import { RoomMember } from "./room-member.ts";
10
8
  import { Thread, ThreadEvent, ThreadEventHandlerMap } from "./thread.ts";
11
9
  import { IActionsObject } from "../pushprocessor.ts";
12
10
  import { MatrixError } from "../http-api/index.ts";
13
11
  import { TypedEventEmitter } from "./typed-event-emitter.ts";
14
12
  import { EventStatus } from "./event-status.ts";
15
- import { CryptoBackend } from "../common-crypto/CryptoBackend.ts";
16
13
  import { IAnnotatedPushRule } from "../@types/PushRules.ts";
17
14
  import { Room } from "./room.ts";
18
15
  import { Membership } from "../@types/membership.ts";
19
- import { DecryptionFailureCode } from "../crypto-api/index.ts";
20
16
  export { EventStatus } from "./event-status.ts";
21
17
  export interface IContent {
22
18
  [key: string]: any;
@@ -195,14 +191,10 @@ export declare class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEve
195
191
  private visibility;
196
192
  private _hasCachedExtEv;
197
193
  private _cachedExtEv;
198
- /** If we failed to decrypt this event, the reason for the failure. Otherwise, `null`. */
199
- private _decryptionFailureReason;
200
194
  private senderCurve25519Key;
201
195
  private claimedEd25519Key;
202
196
  private forwardingCurve25519KeyChain;
203
197
  private untrusted;
204
- private decryptionPromise;
205
- private retryDecryption;
206
198
  private txnId?;
207
199
  /**
208
200
  * A reference to the thread this event belongs to
@@ -247,7 +239,6 @@ export declare class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEve
247
239
  * Should be read-only
248
240
  */
249
241
  forwardLooking: boolean;
250
- verificationRequest?: VerificationRequest;
251
242
  private readonly reEmitter;
252
243
  /**
253
244
  * Construct a Matrix Event object
@@ -411,74 +402,7 @@ export declare class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEve
411
402
  * not report it.
412
403
  */
413
404
  getMembershipAtEvent(): Optional<Membership | string>;
414
- /**
415
- * Replace the content of this event with encrypted versions.
416
- * (This is used when sending an event; it should not be used by applications).
417
- *
418
- * @internal
419
- *
420
- * @param cryptoType - type of the encrypted event - typically
421
- * <tt>"m.room.encrypted"</tt>
422
- *
423
- * @param cryptoContent - raw 'content' for the encrypted event.
424
- *
425
- * @param senderCurve25519Key - curve25519 key to record for the
426
- * sender of this event.
427
- * See {@link MatrixEvent#getSenderKey}.
428
- *
429
- * @param claimedEd25519Key - claimed ed25519 key to record for the
430
- * sender if this event.
431
- * See {@link MatrixEvent#getClaimedEd25519Key}
432
- */
433
- makeEncrypted(cryptoType: string, cryptoContent: object, senderCurve25519Key: string, claimedEd25519Key: string): void;
434
- /**
435
- * Check if this event is currently being decrypted.
436
- *
437
- * @returns True if this event is currently being decrypted, else false.
438
- */
439
- isBeingDecrypted(): boolean;
440
- getDecryptionPromise(): Promise<void> | null;
441
- /**
442
- * Check if this event is an encrypted event which we failed to decrypt
443
- *
444
- * (This implies that we might retry decryption at some point in the future)
445
- *
446
- * @returns True if this event is an encrypted event which we
447
- * couldn't decrypt.
448
- */
449
- isDecryptionFailure(): boolean;
450
- /** If we failed to decrypt this event, the reason for the failure. Otherwise, `null`. */
451
- get decryptionFailureReason(): DecryptionFailureCode | null;
452
- /**
453
- * True if this event is an encrypted event which we failed to decrypt, the receiver's device is unverified and
454
- * the sender has disabled encrypting to unverified devices.
455
- *
456
- * @deprecated: Prefer `event.decryptionFailureReason === DecryptionFailureCode.MEGOLM_KEY_WITHHELD_FOR_UNVERIFIED_DEVICE`.
457
- */
458
- get isEncryptedDisabledForUnverifiedDevices(): boolean;
459
405
  shouldAttemptDecryption(): boolean;
460
- /**
461
- * Start the process of trying to decrypt this event.
462
- *
463
- * (This is used within the SDK: it isn't intended for use by applications)
464
- *
465
- * @internal
466
- *
467
- * @param crypto - crypto module
468
- *
469
- * @returns promise which resolves (to undefined) when the decryption
470
- * attempt is completed.
471
- */
472
- attemptDecryption(crypto: CryptoBackend, options?: IDecryptOptions): Promise<void>;
473
- /**
474
- * Cancel any room key request for this event and resend another.
475
- *
476
- * @param crypto - crypto module
477
- * @param userId - the user who received this event
478
- *
479
- * @returns a promise that resolves when the request is queued
480
- */
481
- cancelAndResendKeyRequest(crypto: Crypto, userId: string): Promise<void>;
482
406
  /**
483
407
  * Calculate the recipients for keyshare requests.
484
408
  *
@@ -487,23 +411,6 @@ export declare class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEve
487
411
  * @returns array of recipients
488
412
  */
489
413
  getKeyRequestRecipients(userId: string): IKeyRequestRecipient[];
490
- private decryptionLoop;
491
- /**
492
- * Update the cleartext data on this event.
493
- *
494
- * (This is used after decrypting an event; it should not be used by applications).
495
- *
496
- * @internal
497
- *
498
- * @param decryptionResult - the decryption result, including the plaintext and some key info
499
- */
500
- private setClearData;
501
- /**
502
- * Update the cleartext data on this event after a decryption failure.
503
- *
504
- * @param reason - the textual reason for the failure
505
- */
506
- private setClearDataForDecryptionFailure;
507
414
  /**
508
415
  * Gets the cleartext content for this event. If the event is not encrypted,
509
416
  * or encryption has not been completed, this will return null.
@@ -794,7 +701,6 @@ export declare class MatrixEvent extends TypedEventEmitter<MatrixEventEmittedEve
794
701
  * In any case, the value it returns is not a faithful serialization of the object.
795
702
  */
796
703
  toJSON(): object;
797
- setVerificationRequest(request: VerificationRequest): void;
798
704
  setTxnId(txnId: string): void;
799
705
  getTxnId(): string | undefined;
800
706
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/models/event.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAoB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAEH,SAAS,EACT,OAAO,EACP,YAAY,EAEZ,wBAAwB,EAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAwB,WAAW,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAmB,MAAM,mCA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