summary refs log tree commit diff
path: root/synapse/rest/client/v1/directory.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-3/+3
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Convert synapse.api to async/await (#8031)Patrick Cloke2020-08-061-1/+1
|
* Port rest/v1 to async/awaitErik Johnston2019-12-051-31/+22
|
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-8/+8
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Replace returnValue with return (#5736)Amber Brown2019-07-231-10/+8
|
* Clean up exception handling for access_tokens (#5656)Richard van der Hoff2019-07-111-2/+8
| | | | | | | | | | | | | | | | First of all, let's get rid of `TOKEN_NOT_FOUND_HTTP_STATUS`. It was a hack we did at one point when it was possible to return either a 403 or a 401 if the creds were missing. We always return a 401 in these cases now (thankfully), so it's not needed. Let's also stop abusing `AuthError` for these cases. Honestly they have nothing that relates them to the other places that `AuthError` is used, other than the fact that they are loosely under the 'Auth' banner. It makes no sense for them to share exception classes. Instead, let's add a couple of new exception classes: `InvalidClientTokenError` and `MissingClientTokenError`, for the `M_UNKNOWN_TOKEN` and `M_MISSING_TOKEN` cases respectively - and an `InvalidClientCredentialsError` base class for the two of them.
* Run Black. (#5482)Amber Brown2019-06-201-18/+13
|
* Unify v1 and v2 REST client APIs (#5226)Amber Brown2019-06-031-13/+15
|
* Clean up room alias creationErik Johnston2018-10-191-32/+5
|
* return NotFoundError if room not foundSerban Constantin2018-07-311-2/+2
| | | | | | | | | | | | | Per the Client-Server API[0] we should return `M_NOT_FOUND` if the room isn't found instead of generic SynapseError. This ensures that /directory/list API returns 404 for room not found instead of 400. [0]: https://matrix.org/docs/spec/client_server/unstable.html#get-matrix-client-r0-directory-list-room-roomid Signed-off-by: Serban Constantin <serban.constantin@gmail.com>
* add changelogKrombel2018-07-131-1/+1
|
* rename assert_params_in_request to assert_params_in_dictKrombel2018-07-131-1/+1
| | | | | | the method "assert_params_in_request" does handle dicts and not requests. A request body has to be parsed to json before this method can be used
* Use parse_{int,str} and assert from http.servletKrombel2018-07-131-6/+5
| | | | | | | parse_integer and parse_string can take a request and raise errors in case we have wrong or missing params. This PR tries to use them more to deduplicate some code and make it better readable
* run isortAmber Brown2018-07-091-5/+4
|
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-1/+1
| | | | what could possibly go wrong
* Check that requested room_id existsAnant Prakash2017-04-141-1/+5
|
* Add new API appservice specific public room listErik Johnston2016-12-061-0/+34
|
* Dont invoke get_handlers fromClientV1RestServletErik Johnston2016-08-121-0/+5
| | | | | | hs.get_handlers() can not be invoked from split out processes. Moving the invocations down a level means that we can slowly split out individual servlets.
* Add published room list edit APIErik Johnston2016-03-211-0/+42
|
* Update aliases event after deletionErik Johnston2016-03-171-1/+2
| | | | | | | | Attempt to update the appropriate `m.room.aliases` event after deleting an alias. This may fail due to the deleter not being in the room. Will also check if the canonical alias of the event is set to the deleted alias, and if so will attempt to delete it.
* Add a parse_json_object functionMark Haines2016-03-091-13/+3
| | | | | to deduplicate all the copy+pasted _parse_json functions. Also document the parse_.* functions.
* Merge pull request #614 from matrix-org/erikj/alias_deleteErik Johnston2016-03-041-3/+0
|\ | | | | Allow alias creators to delete aliases
| * Allow alias creators to delete aliasesErik Johnston2016-03-011-3/+0
| |
* | Pass whole requester to ratelimitingDaniel Wagner-Hall2016-03-031-1/+5
|/ | | | This will enable more detailed decisions
* Introduce a Requester objectDaniel Wagner-Hall2016-01-111-4/+4
| | | | | | | | | This tracks data about the entity which made the request. This is instead of passing around a tuple, which requires call-site modifications every time a new piece of optional context is passed around. I tried to introduce a User object. I gave up.
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Host /unstable and /r0 versions of r0 APIsDaniel Wagner-Hall2015-12-011-2/+2
|
* Allow guests to register and call /events?room_id=Daniel Wagner-Hall2015-11-041-2/+2
| | | | | | | This follows the same flows-based flow as regular registration, but as the only implemented flow has no requirements, it auto-succeeds. In the future, other flows (e.g. captcha) may be required, so clients should treat this like the regular registration flow choices.
* Remove completely unused concepts from codebaseDaniel Wagner-Hall2015-08-251-2/+2
| | | | | | | | | | Removes device_id and ClientInfo device_id is never actually written, and the matrix.org DB has no non-null entries for it. Right now, it's just cluttering up code. This doesn't remove the columns from the database, because that's fiddly.
* Merge pull request #50 from matrix-org/application-servicesMark Haines2015-02-131-13/+47
|\ | | | | Application Services
| * Merge branch 'develop' into application-servicesKegan Dougal2015-02-111-1/+1
| |\
| * | Grant ASes the ability to delete aliases in their own namespace.Kegan Dougal2015-02-061-2/+29
| | |
| * | Grant ASes the ability to create alias in their own namespace.Kegan Dougal2015-02-061-11/+18
| | | | | | | | | | | | | | | | | | Add a new errcode type M_EXCLUSIVE when users try to create aliases inside AS namespaces, and when ASes try to create aliases outside their own namespace.
* | | Blunty replace json with simplejsonErik Johnston2015-02-111-1/+1
| |/ |/|
* | Fix code-styleMark Haines2015-02-101-1/+1
|/
* Extract the id token of the token when authing users, include the token and ↵Mark Haines2015-01-281-2/+2
| | | | device_id in the internal meta data for the event along with the transaction id when sending events
* Return the device_id from get_auth_by_reqMark Haines2015-01-281-2/+2
|
* Extract the client v1 base RestServlet to a separate classMark Haines2015-01-231-2/+2
|
* Replace hs.parse_roomalias with RoomAlias.from_stringMark Haines2015-01-231-4/+5
|
* Move rest APIs back under the rest directoryMark Haines2015-01-221-0/+112