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

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
  • Loading branch information
H-Shay and clokep committed Jul 14, 2023
1 parent 664ad97 commit e366aa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions changelog.d/15929.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
Implement [MSC3814](https://github.com/matrix-org/matrix-spec-proposals/pull/3814),
dehydrated devices v2/shrivelled sessions and move [MSC2697](https://github.com/matrix-org/matrix-spec-proposals/pull/2697)
behind a config flag. Contributed by Nico from Famedly and H-Shay.
Implement [MSC3814](https://github.com/matrix-org/matrix-spec-proposals/pull/3814), dehydrated devices v2/shrivelled sessions and move [MSC2697](https://github.com/matrix-org/matrix-spec-proposals/pull/2697) behind a config flag. Contributed by Nico from Famedly and H-Shay.
4 changes: 2 additions & 2 deletions synapse/handlers/devicemessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ async def get_events_for_dehydrated_device(

# only allow fetching messages for the dehydrated device id currently associated
# with the user
dehydrated_device = await self.device_handler.get_dehydrated_device(user_id)
if dehydrated_device is None or device_id != dehydrated_device[0]:
dehydrated_device_id, _ = await self.device_handler.get_dehydrated_device(user_id)
if dehydrated_device_id is None or device_id != dehydrated_device_id:
raise SynapseError(
HTTPStatus.FORBIDDEN,
"You may only fetch messages for your dehydrated device",
Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class Config:
class DehydratedDeviceServlet(RestServlet):
"""Retrieve or store a dehydrated device.
Implements both MSC2697 and MSC3814.
Implements either MSC2697 and MSC3814.
GET /org.matrix.msc2697.v2/dehydrated_device
Expand Down

0 comments on commit e366aa1

Please sign in to comment.