From 7408acab674673d77bed33ba0f1c685169596291 Mon Sep 17 00:00:00 2001 From: Agnish Bauri Date: Thu, 11 Jun 2026 20:30:09 +0530 Subject: [PATCH] api: Update get_user_presence docstring for modern response format. The example response showed only the legacy format, which is both incomplete and outdated: since Zulip 12.0 (feature level 487/497), the endpoint returns modern active_timestamp/idle_timestamp fields and a top-level server_timestamp, with the legacy website/aggregated dictionaries retained for backwards compatibility. --- zulip/zulip/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 6d725a10b..dc91f36af 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -1218,7 +1218,7 @@ def get_user_presence(self, email: str) -> Dict[str, Any]: Example usage: >>> client.get_user_presence('iago@zulip.com') - {'presence': {'website': {'timestamp': 1486799122, 'status': 'active'}}, 'result': 'success', 'msg': ''} + {'result': 'success', 'msg': '', 'presence': {'active_timestamp': 1656958520, 'idle_timestamp': 1656958530, 'website': {...}, 'aggregated': {...}}, 'server_timestamp': 1656958540.123} """ return self.call_endpoint( url=f"users/{email}/presence",