chore(core): added deprecation notice for v1-2 session strings

This commit is contained in:
alina 🌸 2024-04-14 17:52:47 +03:00
parent 4cc96a843d
commit f24f41b646
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -66,6 +66,15 @@ export function readStringSession(readerMap: TlReaderMap, data: string): StringS
throw new Error(`Invalid session string (version = ${version})`)
}
if (version < 3) {
console.warn(
`You are using a deprecated session string (${data.slice(
0,
10,
)}...). Please update your session string, as it will stop working in the future.`,
)
}
const reader = new TlBinaryReader(readerMap, buf, 1)
const flags = reader.int()