1
0
mirror of https://github.com/matrix-org/dendrite.git synced 2024-06-28 19:57:09 +00:00
matrix-org.dendrite/src/github.com/matrix-org/dendrite/clientapi
Brendan Abolivier 8ff136e595
Fix interactive registration failing (#583)
* Fix interactive registration failing because of being confused with AS registration

* Fix AS registration tests

* Move AS registration handling to dedicated function and split the switch/case to avoid unnecessary condition

* Ignore handleRegistrationFlow() for gocyclo and add some doc/comments on the code
2018-11-06 14:40:37 +00:00
..
auth removed outdated "flag" comments on clientapi membership storage (#566) 2018-07-31 10:06:04 +01:00
consumers Fix linting errors in go1.9.1 (#336) 2017-11-15 11:13:09 +00:00
httputil Propagate error with wrong ?ts= param back to client (#576) 2018-08-22 13:40:25 +01:00
jsonerror Propagate error with wrong ?ts= param back to client (#576) 2018-08-22 13:40:25 +01:00
producers Support PUTing typing status in clientapi (#550) 2018-07-24 20:19:49 +05:30
routing Fix interactive registration failing (#583) 2018-11-06 14:40:37 +00:00
threepid Fix up timestamp messaging (#570) 2018-08-06 18:39:25 +05:30
userutil Move makeUserID into userutil and prevent code duplication (#475) 2018-05-31 15:21:13 +01:00
clientapi.go Make use of /users/{userID} in relevant APIs (#522) 2018-08-20 10:45:17 +01:00
README.md Create README.md 2017-03-13 15:56:26 +00:00

This component roughly corresponds to "Client Room Send" and "Client Sync" on the WIRING diagram. This component produces multiple binaries.

Internals

  • HTTP routing is done using gorilla/mux and the routing paths are in the routing package.

Writers

  • Each HTTP "write operation" (/createRoom, /rooms/$room_id/send/$type, etc) is contained entirely to a single file in the writers package.
  • This file contains the request and response struct definitions, as well as a Validate() bool function to validate incoming requests.
  • The entry point for each write operation is a stand-alone function as this makes testing easier. All dependencies should be injected into this function, including server keys/name, etc.