mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +03:00
Fix: should remember already reported events
This commit is contained in:
parent
0f3f2b164e
commit
2bbb49bdd3
2 changed files with 8 additions and 1 deletions
|
@ -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 a new issue