Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 85043d4

Browse files
committed
DecryptionFailureTracker: use a different Posthog code for historical UTDs
1 parent 45708b1 commit 85043d4

File tree

3 files changed

+11
-36
lines changed

3 files changed

+11
-36
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
},
6868
"dependencies": {
6969
"@babel/runtime": "^7.12.5",
70-
"@matrix-org/analytics-events": "^0.12.0",
70+
"@matrix-org/analytics-events": "^0.19.0",
7171
"@matrix-org/emojibase-bindings": "^1.1.2",
7272
"@matrix-org/matrix-wysiwyg": "2.17.0",
7373
"@matrix-org/olm": "3.2.15",

src/DecryptionFailureTracker.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ export class DecryptionFailure {
3131
}
3232
}
3333

34-
type ErrorCode = "OlmKeysNotSentError" | "OlmIndexError" | "UnknownError" | "OlmUnspecifiedError";
35-
34+
type ErrorCode = ErrorEvent["name"];
3635
type TrackingFn = (count: number, trackedErrCode: ErrorCode, rawError: string) => void;
37-
3836
export type ErrCodeMapFn = (errcode: DecryptionFailureCode) => ErrorCode;
3937

4038
export class DecryptionFailureTracker {
@@ -56,6 +54,8 @@ export class DecryptionFailureTracker {
5654
return "OlmKeysNotSentError";
5755
case DecryptionFailureCode.OLM_UNKNOWN_MESSAGE_INDEX:
5856
return "OlmIndexError";
57+
case DecryptionFailureCode.HISTORICAL_MESSAGE:
58+
return "HistoricalMessage";
5959
default:
6060
return "UnknownError";
6161
}

yarn.lock

+7-32
Original file line numberDiff line numberDiff line change
@@ -1835,10 +1835,10 @@
18351835
resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe"
18361836
integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==
18371837

1838-
"@matrix-org/analytics-events@^0.12.0":
1839-
version "0.12.0"
1840-
resolved "https://registry.yarnpkg.com/@matrix-org/analytics-events/-/analytics-events-0.12.0.tgz#2e48c75eb39c38cbb52f0cd479eed4c835064e9f"
1841-
integrity sha512-J/rP11P2Q9PbH7iUzHIthnAQlJL1HEorUjtdd/yCrXDSk0Gw4dNe1FM2P75E6m2lUl2yJQhzGuahMmqe9xOWaw==
1838+
"@matrix-org/analytics-events@^0.19.0":
1839+
version "0.19.0"
1840+
resolved "https://registry.yarnpkg.com/@matrix-org/analytics-events/-/analytics-events-0.19.0.tgz#e20e4df54530ed1c755ab728e9c22891e376f9e2"
1841+
integrity sha512-wN/hbpTpOxz2u3zHbsJgVMi88oKmK1yqeSZuif3yNW68XQnV2cc0XGUEpl0fgLOl6fj1bZOtxbDg5rCLbqf4CQ==
18421842

18431843
"@matrix-org/emojibase-bindings@^1.1.2":
18441844
version "1.1.3"
@@ -8613,16 +8613,7 @@ string-length@^4.0.1:
86138613
char-regex "^1.0.2"
86148614
strip-ansi "^6.0.0"
86158615

8616-
"string-width-cjs@npm:string-width@^4.2.0":
8617-
version "4.2.3"
8618-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
8619-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
8620-
dependencies:
8621-
emoji-regex "^8.0.0"
8622-
is-fullwidth-code-point "^3.0.0"
8623-
strip-ansi "^6.0.1"
8624-
8625-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
8616+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
86268617
version "4.2.3"
86278618
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
86288619
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -8716,14 +8707,7 @@ string_decoder@~1.1.1:
87168707
dependencies:
87178708
safe-buffer "~5.1.0"
87188709

8719-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
8720-
version "6.0.1"
8721-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
8722-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
8723-
dependencies:
8724-
ansi-regex "^5.0.1"
8725-
8726-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
8710+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
87278711
version "6.0.1"
87288712
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
87298713
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -9515,7 +9499,7 @@ which@^2.0.1:
95159499
dependencies:
95169500
isexe "^2.0.0"
95179501

9518-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
9502+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
95199503
version "7.0.0"
95209504
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
95219505
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -9533,15 +9517,6 @@ wrap-ansi@^6.2.0:
95339517
string-width "^4.1.0"
95349518
strip-ansi "^6.0.0"
95359519

9536-
wrap-ansi@^7.0.0:
9537-
version "7.0.0"
9538-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
9539-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
9540-
dependencies:
9541-
ansi-styles "^4.0.0"
9542-
string-width "^4.1.0"
9543-
strip-ansi "^6.0.0"
9544-
95459520
wrap-ansi@^8.1.0:
95469521
version "8.1.0"
95479522
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)