@@ -386,6 +386,11 @@ class User(Object, Update):
386386 note (:obj:`~pyrogram.types.FormattedText`, *optional*):
387387 Note added to the user's contact.
388388
389+ uses_unofficial_app (``bool``, *optional*):
390+ True, if the user was marked as a user of an unofficial
391+ Telegram app with security risk
392+ Returned only in :meth:`~pyrogram.Client.get_me`
393+
389394 raw (:obj:`~pyrogram.raw.base.User` | :obj:`~pyrogram.raw.base.UserStatus`, *optional*):
390395 The raw user or user status object, as received from the Telegram API.
391396
@@ -493,6 +498,7 @@ def __init__(
493498 pending_rating_date : Optional [datetime ] = None ,
494499 accepted_gift_types : Optional ["types.AcceptedGiftTypes" ] = None ,
495500 note : Optional ["types.FormattedText" ] = None ,
501+ uses_unofficial_app : Optional [bool ] = None ,
496502 raw : Optional [Union ["raw.base.User" , "raw.base.UserStatus" ]] = None
497503 ):
498504 super ().__init__ (client )
@@ -587,6 +593,7 @@ def __init__(
587593 self .pending_rating_date = pending_rating_date
588594 self .accepted_gift_types = accepted_gift_types
589595 self .note = note
596+ self .uses_unofficial_app = uses_unofficial_app
590597 self .raw = raw
591598
592599 @property
@@ -773,6 +780,7 @@ async def _parse_full(client, user: "raw.types.UserFull", users: dict, chats: di
773780 parsed_user .pending_rating_date = utils .timestamp_to_datetime (user .stars_my_pending_rating_date )
774781 parsed_user .accepted_gift_types = types .AcceptedGiftTypes ._parse (user .disallowed_gifts )
775782 parsed_user .note = types .FormattedText ._parse (client , user .note )
783+ parsed_user .uses_unofficial_app = user .unofficial_security_risk
776784
777785 return parsed_user
778786
0 commit comments