* persist previously-reported event IDs as a bloom filter
* Pin to older `@types/seedrandom`
... to work around https://github.com/Callidon/bloom-filters/issues/72
* Inline `DecryptionFailureTracker.addDecryptionFailure`
* Remove redundant TRACK_INTERVAL
There really doesn't seem to be much point to this batching up of decryption
failure reports. We still call the analytics callback the same number of times.
* Rename `trackedEvents` to `reportedEvents`
* Fix incorrect documentation on `visibleEvents`
This *does* overlap with `failures`.
* Combine `addFailure` and `reportFailure`
* Calculate client properties before starting reporting
* Clear localstorage after each test
... otherwise they interfere
* Remove redundant comment
* Ensure that reports are cleared on a logout/login cycle
* make private const private and const
---------
Co-authored-by: Richard van der Hoff <richard@matrix.org>
* Inline `DecryptionFailureTracker.addDecryptionFailure`
* Remove redundant TRACK_INTERVAL
There really doesn't seem to be much point to this batching up of decryption
failure reports. We still call the analytics callback the same number of times.
* Rename `trackedEvents` to `reportedEvents`
* Fix incorrect documentation on `visibleEvents`
This *does* overlap with `failures`.
* Combine `addFailure` and `reportFailure`
* Calculate client properties before starting reporting
* report time to decrypt an event if it's slow
* add more stats
* fix some tests
* keep original timestamp, and report non-visible decryption failures
* add statistic for whether the user trusts their own device
* revert local playwright docker changes
* apply changes from review
* also remove logout event handler on logout
* apply changes from review
* make eventDecrypted callback private
* Use different messages for UTDs sent before login
* Playwright test for historical events
* Add some tests
* initial work on pre-join UTDs
* add playwright tests and remove old pre-join UTD logic
* run i18n script
* fix type error
* use different error code in PostHog for pre-join UTD
* don't remove old pre-join UTD logic yet
---------
Co-authored-by: Richard van der Hoff <richard@matrix.org>
* `DecryptionFailureTracker`: stronger typing
Use `DecryptionFailureCode` rather than string
* `DecryptionFailureTracker`: remove use of `DecryptionError`
The second argument to `MatrixEventEvent.Decrypted` callbacks is deprecatedf,
and we can get the info we need direct from the event. This means that we no
longer need to reference the internal `DecryptionError` class in the js-sdk.
* `DecryptionFailureTracker`: use a different Posthog code for historical UTDs
* Update for new UTD error codes
* Remove reference to private method
`MatrixEvent.setClearData` is private. Use the test helper instead.
* Remove redundant params to `expect.toBe`
* Convert to typescript