From f00153197a7a04997b78ed1b8cd78d818e6e0ea6 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 22 Aug 2025 13:26:54 +0300 Subject: [PATCH] add notifications field to the User class --- twikit/user.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/twikit/user.py b/twikit/user.py index 5535a346..400639e3 100644 --- a/twikit/user.py +++ b/twikit/user.py @@ -84,11 +84,14 @@ class User: The type of profile interstitial. withheld_in_countries : list[:class:`str`] Countries where the user's content is withheld. + notifications : :class:`bool` + Indicates if notifications were enabled for this user. """ def __init__(self, client: Client, data: dict) -> None: self._client = client legacy = data['legacy'] + self._legacy: dict = legacy self.id: str = data['rest_id'] self.created_at: str = legacy['created_at'] @@ -123,6 +126,7 @@ def __init__(self, client: Client, data: dict) -> None: self.translator_type: str = legacy['translator_type'] self.withheld_in_countries: list[str] = legacy['withheld_in_countries'] self.protected: bool = legacy.get('protected', False) + self.notifications: bool = legacy.get('notifications', False) @property def created_at_datetime(self) -> datetime: