* Fix#622 /get_missing_events/{roomId}
Signed-off-by: Alex Chen <minecnly@gmail.com>
* Set initial size for eventsToFilter in /get_missing_events/{roomId}
Signed-off-by: Alex Chen <minecnly@gmail.com>
* Implement the /backfill federation endpoint
* Make the BFS loop block common between QueryMissingEvents and QueryPreviousEvents
* Improve comments on the BFS loop block
* Optimisation: prevent unnecessary redefinitions/reallocations
* Add trailing slash at the end of the route for parity with synapse
* Replace QueryPreviousEvents with QueryBackfill
* Change the backfill response to comply with the specs and synapse's behaviour
* Implement query to get state and auth chain
* Add routing for queryStateAndAuthChain
* Comments
* Fix fetching wrong set of events
* Add tests
* Shuffle and comment
* Implement case where user left the room
* Filter by membership event
* Move the logic from the storage to the query API
* Fix check on state entries iteration
* Remove aliases methods from query API
* Use structure for response to match with the spec
* Remove filtering on /members and implement /joined_members
* Add query API for listing active invites
This lists the invites for a user in a room that could be used to
join the room over federation.
* s/Lookup/Look up/
* Fix implements comments
* Basic memberships retrieval
* Change the way the memberships are saved in the client API database
* Retrieve single membership
* Get memberships only if the user is or has been in the room
* Check server name on room ID instead of user ID
* Save the join membership event and updates it when necessary
* Membership events retrieval + update on leave
* Implement the API on the roomserver and client API server
* Fix comments
* Remove the functions and attributes used before the new query API
* Explicitely state what we return in query
* Remove tab
* Add database functions to interact with aliases
* Save room alias
* Check if alias already exists
* Implement local alias lookup
* Implement alias removal
* Move alias API
* Handle case with no alias set for a room
* Apply requested changes
* Set depth of events and whether they need to be federated.
Set the depth of each new event to one greater than the maximum depth
of it's direct ancestors.
Add a flag to each event passing through the roomserver that tells us
whether the event needs to be sent over federation.
We do this by passing the name of the server to send the event as.
We will need this capability if we want to support vhosting as it is
not possible to tell from the event alone which server to send it as.
(The reason for this is that sometimes a event needs to be sent on
behalf of a different remote matrix server)
* Update roomserver integration tests
* More comments
* Constants and comments
* Fix comments
* Document the int64 returned by LatestEventIDs
* Add API for querying events by ID.
* Fix tense
* Start implementing federation ingress
* More stuff
* Hook up federation event receiving
* Handle the case where we are missing state
* Fix docstring and comments
* Fix infinite loop when printing unknownRoomError
* Add API for querying events by ID.
* Fix tense
* Start implementing federation ingress
* More stuff
* Hook up federation event receiving
* Fix comments
* Comment on the order of the arrays
* Add API for querying the state after a list of events
* Implement state after events API
* Actually implement the API
* Reorder .travis.yml
* Comments
* Use common.MakeAPI
* Return the requested portions of current state in the query API
* Use Unique from github.com/matrix-org/util
* rewrite bulkSelectFilteredStateBlockEntries to use append for clarity
* Add test for stateKeyTupleSorter
* Replace current with a new StateEntryList rather than individually setting the fields
* Start implementing a query API for go using net/rpc
* Use a conventional JSON POST API rather than go net/rpc
net/rpc doesn't automatically handle reconnecting and we have better
logging and metrics infrastructure for monitoring HTTP apis.
* Implement the query API and add it to the integration tests
* Increase the timeout, travis seems to be a bit slow
* Clarify that state events are the things that are not returned if they are not requested
* Add utility function for converting arrays of numeric event IDs to pq Int64Arrays
* Warn people against requesting empty state keys by accident