Commit Graph

10 Commits

Author SHA1 Message Date
Patrick Cloke
f685318c2a
Use ClientRestResource on both the main process and workers. ()
Add logic to ClientRestResource to decide whether to mount servlets
or not based on whether the current process is a worker.

This is clearer to see what a worker runs than the completely separate /
copy & pasted list of servlets being mounted for workers.
2022-12-02 13:10:05 -05:00
Patrick Cloke
6d47b7e325
Add a type hint for get_device_handler() and fix incorrect types. ()
This was the last untyped handler from the HomeServer object. Since
it was being treated as Any (and thus unchecked) it was being used
incorrectly in a few places.
2022-11-22 14:08:04 -05:00
David Robertson
dbfc9b803e
Fix dehydrated device REST checks () 2022-10-31 20:31:43 +00:00
David Robertson
2295095c97
Use Pydantic to validate /devices endpoints () 2022-10-07 13:54:07 +01:00
Andrew Morgan
f9f03426de
Implement MSC3852: Expose last_seen_user_agent to users for their own devices; also expose to Admin API () 2022-08-19 16:17:10 +00:00
Patrick Cloke
9dc3293e0b
Consolidate the logic of delete_device/delete_devices. ()
By always using delete_devices and sometimes passing a list
with a single device ID.

Previously these methods had gotten out of sync with each
other and it seems there's little benefit to the single-device
variant.
2022-06-07 07:43:35 -04:00
reivilibre
e5cdb9e233
Make get_device return None if the device doesn't exist rather than raising an exception. ()
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2021-12-13 15:39:43 +00:00
Andrew Morgan
aa2c027792
Remove unnecessary parentheses around tuples returned from methods () 2021-09-23 11:59:07 +01:00
Patrick Cloke
1aa0dad021
Additional type hints for REST servlets (part 2). ()
Applies the changes from  to additional modules.
2021-08-26 11:53:52 +00:00
reivilibre
642a42edde
Flatten the synapse.rest.client package () 2021-08-17 11:57:58 +00:00