2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 04:48:06 +00:00

Add get_user_dc method

This commit is contained in:
Dan 2019-05-29 09:43:48 +02:00
parent 09d012b696
commit 38de4299c5
2 changed files with 10 additions and 10 deletions

View File

@ -16,24 +16,24 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from .delete_user_profile_photos import DeleteUserProfilePhotos
from .delete_photos import DeletePhotos
from .get_me import GetMe
from .get_user_dc import GetUserDC
from .get_user_profile_photos import GetUserProfilePhotos
from .get_user_profile_photos_count import GetUserProfilePhotosCount
from .get_user_photos import GetUserPhotos
from .get_user_photos_count import GetUserPhotosCount
from .get_users import GetUsers
from .set_user_profile_photo import SetUserProfilePhoto
from .set_photo import SetPhoto
from .update_username import UpdateUsername
class Users(
GetUserProfilePhotos,
SetUserProfilePhoto,
DeleteUserProfilePhotos,
GetUserPhotos,
SetPhoto,
DeletePhotos,
GetUsers,
GetMe,
UpdateUsername,
GetUserProfilePhotosCount,
GetUserPhotosCount,
GetUserDC
):
pass

View File

@ -46,7 +46,7 @@ class GetUserDC(BaseClient):
r = r[0]
if r.photo:
if isinstance(r.photo.photo_small, types.FileLocation):
return r.photo.photo_small.dc_id
if isinstance(r.photo, types.UserProfilePhoto):
return r.photo.dc_id
return None