Browse Source

Update getMe

Painor 1 year ago
parent
commit
294c6f2392
3 changed files with 90 additions and 591 deletions
  1. 2 2
      gramjs/client/users.ts
  2. 87 588
      package-lock.json
  3. 1 1
      package.json

+ 2 - 2
gramjs/client/users.ts

@@ -127,7 +127,7 @@ export async function getMe<
     R = T extends true ? Api.InputPeerUser : Api.User
 >(client: TelegramClient, inputPeer: T): Promise<R> {
     if (inputPeer && client._selfInputPeer) {
-        return client._selfInputPeer as R;
+        return client._selfInputPeer as unknown as R;
     }
     const me = (
         await client.invoke(
@@ -142,7 +142,7 @@ export async function getMe<
             false
         ) as Api.InputPeerUser;
     }
-    return inputPeer ? (client._selfInputPeer as R) : (me as R);
+    return inputPeer ? (client._selfInputPeer as unknown as R) : (me as unknown as R);
 }
 
 /** @hidden */

File diff suppressed because it is too large
+ 87 - 588
package-lock.json


+ 1 - 1
package.json

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

Some files were not shown because too many files changed in this diff