9557ccada4
* Check membership of room * Use QueryStateAfterEventsResponse * Fix complexity * Add field ShouldHitAppservice to GetRoomIDForAlias * Hit appservice when trying to join a non-existent alias * remove unused * Changes that I made a long time ago * Rename to appserviceJoinedAtEvent * Check membership in GetMemberships * Update QueryMembershipsForRoom * Tweaks in client API * Update appserviceJoinedAtEvent * Comments * Try QueryMembershipForUser instead * Undo some changes to client API that shouldn't be needed * More /event tweaks * Refactor /event bit * Go back to QueryMembershipsForRoom because appservices are hard * Fix bugs in onMessage * Add comments * More logical naming, clean up a bit Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com> |
||
---|---|---|
.. | ||
api | ||
auth | ||
httputil | ||
jsonerror | ||
producers | ||
routing | ||
threepid | ||
userutil | ||
clientapi.go | ||
README.md |
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 therouting
package.
Writers
- Each HTTP "write operation" (
/createRoom
,/rooms/$room_id/send/$type
, etc) is contained entirely to a single file in thewriters
package. - This file contains the request and response
struct
definitions, as well as aValidate() 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.