Cleanup work on DecryptionFailureTracker (#12546)

* 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
This commit is contained in:
Richard van der Hoff 2024-05-17 17:19:31 +01:00 committed by GitHub
parent 75562b1d1b
commit 3e103941d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 51 additions and 113 deletions

View file

@ -1591,7 +1591,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
// tracked events across sessions.
// dft.loadTrackedEventHashMap();
dft.start(cli);
dft.start(cli).catch((e) => logger.error("Unable to start DecryptionFailureTracker", e));
cli.on(ClientEvent.Room, (room) => {
if (cli.isCryptoEnabled()) {