This PR adds the test that matrix-org/sytest#642 will allow to pass to testfile and also contains a minor fix for show-expected-fail-tests.sh so it doesn't show an empty warning.
Signed-off-by: Alex Chen minecnly@gmail.com
We were escaping the URL before performing any pattern matching on it.
This meant that if you sent data that URLdecoded to a "/", it would count as
a "/" in the URL, potentially causing a 404. This was causing some flaky tests
with some randomly-generated query parameters.
Now, we keep URLs encoded while doing the pattern matching, and only afterwards
do we URL decode each query parameter individually before passing them to their
respective handler functions.
github.com/gorilla/mux was also updated to v1.7.3 to fix a bug with URL encoding and subrouters.
The logs had a lot of:
```
Sending EDU event destinations="[]" edu_type=m.typing
```
Which is useless if it isn't actually sending the event anywhere (destinations is empty).
A conditional is added to wrap the call to appserviceAPI if a local alias is not found in the database.
Fixes#631
Signed-off-by: Serra Allgood <serra@allgood.dev>
Fix Docker files which had been forgotten in #594 and update scripts and docs to remove references to gb.
I also removed the `jenkins` directory which is outdated. We can revert f8d7e99 if we realise that it was a mistake to do so.
The regular device check will return the device for the appservice's bot user instead of going through the user_id branch. The check has been moved to below the user_id check to ensure the right virtual user's device is chosen.
* Use absolute links in pull request template
Relative links don't work in most places
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Use matrix.to (for now) instead of linking to riot.im/develop
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* POST /join/{roomId}: Allow joining even when not invited #663
Signed-off-by: Alex Chen <minecnly@gmail.com>
* POST /join/{roomId}: Use server in roomID as last resort to join
Signed-off-by: Alex Chen <minecnly@gmail.com>
* 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>
* Fix the sync api returning an empty sync response when reaching timeout, regardless of the since token
* Declare syncData from the start to avoid declaration shadowing
* Bump Kafka version
Since this is a huge bump, it might completely blow up - I'll revert it if that's the case
* Put the loop and the IsEmpty() check back in sync handler
* Add doc and allow returning if timeout is reached
* 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