From 2d65eb3dc7e3e12904f1c7c0f79807ebb0b99ba1 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 14 Oct 2018 17:56:51 +0200 Subject: [PATCH] Add UserStatus docstrings --- .../types/user_and_chats/user_status.py | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/types/user_and_chats/user_status.py b/pyrogram/client/types/user_and_chats/user_status.py index 90399f43..8792a4df 100644 --- a/pyrogram/client/types/user_and_chats/user_status.py +++ b/pyrogram/client/types/user_and_chats/user_status.py @@ -20,7 +20,42 @@ from pyrogram.api.core import Object class UserStatus(Object): - """This object represents a User last seen status + """This object represents a User status (Last Seen privacy) + + .. note:: + + You won't see exact last seen timestamps for people with whom you don't share your own. Instead, you get + "recently", "within_week", "within_month" or "long_time_ago" fields set. + + Args: + online (``bool``): + True if the user is online in this moment, None otherwise. + If True, the "date" field will be also set containing the online expiration date (i.e.: the date when a + user will automatically go offline in case of no action by his client). + + offline (``bool``): + True if the user is offline and has the Last Seen privacy setting visible for everybody, None otherwise. + If True, the "date" field will be also set containing the last seen date (i.e.: the date when a user + was online the last time). + + recently (``bool``): + True for users with hidden Last Seen privacy that have been online between 1 second and 2-3 days ago, + None otherwise. + + within_week (``bool``): + True for users with hidden Last Seen privacy that have been online between 2-3 and seven days ago, + None otherwise. + + within_month (``bool``): + True for users with hidden Last Seen privacy that have been online between 6-7 days and a month ago, + None otherwise. + + long_time_ago (``bool``): + True for users with hidden Last Seen privacy that have been online more than a month ago (this is also + always shown to blocked users), None otherwise. + + date (``int``): + Exact date in unix time. Available only in case "online" or "offline" equals to True. """ ID = 0xb0700031