Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove "user_id" from GET /presence. (#7606)
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot authored Jun 11, 2020
1 parent 1ad06ee commit a3fbc23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/7606.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove `user_id` from the response to `GET /_matrix/client/r0/presence/{userId}/status` to match the specification.
4 changes: 3 additions & 1 deletion synapse/rest/client/v1/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ async def on_GET(self, request, user_id):
raise AuthError(403, "You are not allowed to see their presence.")

state = await self.presence_handler.get_state(target_user=user)
state = format_user_presence_state(state, self.clock.time_msec())
state = format_user_presence_state(
state, self.clock.time_msec(), include_user_id=False
)

return 200, state

Expand Down

0 comments on commit a3fbc23

Please sign in to comment.