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

This commit is contained in:
Will Hunt
2020-06-11 14:13:53 -04:00
committed by GitHub
parent 1ad06ee6eb
commit a3fbc23c39
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Remove `user_id` from the response to `GET /_matrix/client/r0/presence/{userId}/status` to match the specification.
+3 -1
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