Browse Source

update version

painor 3 years ago
parent
commit
cb7560b519
4 changed files with 8 additions and 4 deletions
  1. 1 1
      gramjs/Version.ts
  2. 4 0
      gramjs/client/auth.ts
  3. 2 2
      package-lock.json
  4. 1 1
      package.json

+ 1 - 1
gramjs/Version.ts

@@ -1 +1 @@
-export const version = "1.8.11";
+export const version = "1.8.12";

+ 4 - 0
gramjs/client/auth.ts

@@ -382,6 +382,10 @@ export async function signInWithPassword(
             const passwordSrpResult = await client.invoke(
                 new Api.account.GetPassword()
             );
+            if (!authParams.password) {
+                throw new Error("Account has 2FA enabled.");
+            }
+
             const password = await authParams.password(passwordSrpResult.hint);
             if (!password) {
                 throw new Error("Password is empty");

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "telegram",
-  "version": "1.8.11",
+  "version": "1.8.12",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "telegram",
-      "version": "1.8.11",
+      "version": "1.8.12",
       "license": "MIT",
       "dependencies": {
         "@cryptography/aes": "^0.1.1",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "telegram",
-  "version": "1.8.11",
+  "version": "1.8.12",
   "description": "NodeJS/Browser MTProto API Telegram client library,",
   "main": "index.js",
   "types": "index.d.ts",