Add PostHog codes for trust requirement failures (#28292)

* Add PostHog codes for trust requirement failures

* add tests for new codes
This commit is contained in:
Hubert Chathi 2024-10-28 09:16:48 -04:00 committed by GitHub
parent 86bb0ec00d
commit de9a2cc382
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 33 deletions

View file

@ -496,6 +496,8 @@ describe("DecryptionFailureTracker", function () {
await createAndTrackEventWithError(DecryptionFailureCode.HISTORICAL_MESSAGE_USER_NOT_JOINED);
await createAndTrackEventWithError(DecryptionFailureCode.MEGOLM_KEY_WITHHELD);
await createAndTrackEventWithError(DecryptionFailureCode.MEGOLM_KEY_WITHHELD_FOR_UNVERIFIED_DEVICE);
await createAndTrackEventWithError(DecryptionFailureCode.SENDER_IDENTITY_PREVIOUSLY_VERIFIED);
await createAndTrackEventWithError(DecryptionFailureCode.UNSIGNED_SENDER_DEVICE);
await createAndTrackEventWithError(DecryptionFailureCode.UNKNOWN_ERROR);
// Pretend "now" is Infinity
@ -510,6 +512,8 @@ describe("DecryptionFailureTracker", function () {
"ExpectedDueToMembership",
"OlmKeysNotSentError",
"RoomKeysWithheldForUnverifiedDevice",
"ExpectedVerificationViolation",
"ExpectedSentByInsecureDevice",
"UnknownError",
]);
});