* 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
* 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
* make MatrixError implement error interface
* let ParseTSParam return error when no int transmitted
* fix to high cyclo for SendEvent
* Move generateSendEvent below SendEvent
* Drop ParseIntParam() as it is used only in one place
* Parse ts param at the beginning of JoinRoom
to be able to abort right in the beginning and
to not parse the MatrixError to get an error response
* make ParseTSParam() return error instead of JSONResponse
* Query whether a room alias exists on app services
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
* Query AS /alias/ API at a lower level
* Add support for querying /users/ on appservices
* Have endpoints query AS users if not found locally
* GetJoinedHosts from federation server db
* Add dummy api.OutputTypingEvent
* Add a typing server consumer to federation sender
* Update queue to support EDU events
* Update OutputTypingEvent format
* Use SendEDU in federation server, remove dummy/api
* Add helpful comments
* fix typo
* remove origin field
* Count EDUs in sendCounter
* Query whether a room alias exists on app services
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
* URL encode room alias before sending to AS
* Add /room/ to path
* Query AS /alias/ API at a lower level
* Don't verify self-signed AS certificates
* Don't skip cert validation on appservices, fix logging
* Separate req.WithContext
* Linting
* Do not warn when an AS room alias does not exist
* Revert "implement AS timestamp massaging (#542)"
This reverts commit a56752f3f6.
* Update APIs to support ts
* refactor MakeJoin, make code consistent
* Keep one parameter per line
* update gomatrixserverlib
* Make removeUser public
* Implement api.TypingServerInputAPI
* Integrate the typing server component, create kafka topic
* Add typing server cmd for multiprocess dendrite
* Add typing cache
Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
* Add tests for typingCache
* Make test stricter
* Handle cases where expireTime is updated
* Make the slice comparisons sturdy
* Use timers to call removeUser after timeout
* Add test for TypingCache.removeUser
Signed-Off-By: Matthias Kesler <krombel@krombel.de>
* Write deterministic test
* Refactor string slice helper to common/test
Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
* Do not modify the given slice
* Add Unsorted in the function name