From c0890d8cdb41666d4fee948585dfd8376e21ea60 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Mon, 7 May 2018 16:45:05 +0200
Subject: [PATCH] Make get_me return the new type
---
pyrogram/client/methods/users/get_me.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/pyrogram/client/methods/users/get_me.py b/pyrogram/client/methods/users/get_me.py
index b0f36f85..80ee65e9 100644
--- a/pyrogram/client/methods/users/get_me.py
+++ b/pyrogram/client/methods/users/get_me.py
@@ -17,21 +17,23 @@
# along with Pyrogram. If not, see .
from pyrogram.api import functions, types
-from ...ext import BaseClient
+from ...ext import BaseClient, utils
class GetMe(BaseClient):
def get_me(self):
- """A simple method for testing the user authorization. Requires no parameters.
+ """A simple method for testing your authorization. Requires no parameters.
Returns:
- Full information about the user in form of a :obj:`UserFull ` object.
+ Basic information about the user or bot in form of a :obj:`User` object
Raises:
:class:`Error `
"""
- return self.send(
- functions.users.GetFullUser(
- types.InputPeerSelf()
- )
+ return utils.parse_user(
+ self.send(
+ functions.users.GetFullUser(
+ types.InputPeerSelf()
+ )
+ ).user
)