Fix: should remember already reported events
This commit is contained in:
parent
0f3f2b164e
commit
2bbb49bdd3
|
@ -201,6 +201,10 @@ class DecryptionFailureTracker @Inject constructor(
|
|||
// already tracked
|
||||
return
|
||||
}
|
||||
if (alreadyReported.contains(eventId)) {
|
||||
// already reported
|
||||
return
|
||||
}
|
||||
val isOwnIdentityTrusted = session.cryptoService().crossSigningService().isCrossSigningVerified()
|
||||
val userHS = MatrixPatterns.extractServerNameFromId(session.myUserId)
|
||||
val messageSenderHs = event.senderId?.let { MatrixPatterns.extractServerNameFromId(it) }
|
||||
|
|
|
@ -376,9 +376,12 @@ class DecryptionFailureTrackerTest {
|
|||
verify(exactly = 1) { fakeAnalyticsTracker.capture(any()) }
|
||||
|
||||
decryptionFailureTracker.onEventDecryptionError(event, aUISIError)
|
||||
|
||||
runCurrent()
|
||||
|
||||
// advance time by 7 seconds, to be ahead of the grace period
|
||||
currentFakeTime += 7_000
|
||||
fakeClock.givenEpoch(currentFakeTime)
|
||||
|
||||
decryptionFailureTracker.onEventDecrypted(event, emptyMap())
|
||||
runCurrent()
|
||||
|
||||
|
|
Loading…
Reference in New Issue