mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 03:53:50 +00:00 
			
		
		
		
	presence: Allow bots to fetch realm presence data.
Before, presence information for an entire realm could only be queried via the `POST /api/v1/users/me/presence` endpoint. However, this endpoint also updates the presence information for the user making the request. Therefore, bot users are not allowed to access this endpoint because they don't have any presence data. This commit adds a new endpoint `GET /api/v1/realm/presence` that just returns the presence information for the realm of the caller. Fixes #10651.
This commit is contained in:
		| @@ -116,6 +116,9 @@ v1_api_and_json_patterns = [ | ||||
|     url(r'^realm/deactivate$', rest_dispatch, | ||||
|         {'POST': 'zerver.views.realm.deactivate_realm'}), | ||||
|  | ||||
|     url(r'^realm/presence$', rest_dispatch, | ||||
|         {'GET': 'zerver.views.presence.get_statuses_for_realm'}), | ||||
|  | ||||
|     # users -> zerver.views.users | ||||
|     # | ||||
|     # Since some of these endpoints do something different if used on | ||||
|   | ||||
		Reference in New Issue
	
	Block a user