In 29841be (#718), EDUs are added to /sync responses for rooms listed
in joinedRoomIDs returned by addPDUDeltaToResponse. However this list
may contain rooms other than those currently joined.
Some variable renamings are done to make golangci-lint pass.
Signed-off-by: Alex Chen minecnly@gmail.com
In 29841be (#718), EDUs are added to /sync responses for rooms listed
in joinedRoomIDs returned by addPDUDeltaToResponse. However this list
may contain rooms other than those currently joined.
Some variable renamings are done to make golangci-lint pass.
Signed-off-by: Alex Chen minecnly@gmail.com
Manipulate filters as gomatrix.Filter structures, instead of their []byte JSON representation.
This lays ground work for using filters in dendrite for /sync requests.
As a response to #638, it seems that POST /publicRooms is already implemented. It is, however, unclear from the code that it is.
Add some comments and change a method name to make this more clear.
Closes#523
There were a lot of unnecessary checks for HTTP methods of requests. gorilla/mux makes sure that these methods will only be called if certain HTTP methods are used, thus there's no reason to have these extra checks.
This PR adds a new consumer for typing notifications in syncapi. It also brings changes to syncserver.go and some related files so EDUs can better fit in /sync responses.
Fixes#635.
Fixes#574.
Every time before sending a PR I like to run ./scripts/build-test-lint.sh to make sure the CI won't complain about anything.
The problem is that this script attempts to install golangci-lint, which causes modifications to go.mod/go.sum. This PR backs up and restores those files before and after linting.
Ideally instead of this hacky backing up/restoring we'd use go gets -mod=readonly option, but that still modifies go.sum. This will be fixed in go 1.13 apparently. golang/go#30667
This should fix#628
I also Noticed that GET /_matrix/media/r0/download/{serverName}/{mediaId}/{fileName} is not yet implemented, but it should work for both.
Signed-off-by: Kouamé Behouba Manassé behouba@gmail.com
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>