Remove "user_id" from GET /presence. (#7606)

This commit is contained in:
Will Hunt 2020-06-11 19:13:53 +01:00 committed by GitHub
parent 1ad06ee6eb
commit a3fbc23c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

1
changelog.d/7606.bugfix Normal file
View File

@ -0,0 +1 @@
Remove `user_id` from the response to `GET /_matrix/client/r0/presence/{userId}/status` to match the specification.

View File

@ -51,7 +51,9 @@ class PresenceStatusRestServlet(RestServlet):
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