Commit graph

17 commits

Author SHA1 Message Date
Cnly f3bc28fa66 Merge branch 'master' into event-redaction
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-08-01 12:41:58 +08:00
Alex Chen 3578d77d25
Implement "full_state" query parameter for /sync (#751)
Closes #637.
2019-08-01 12:36:13 +08:00
Cnly 99859a8afc Add docs for validateRedactions
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-08-01 12:33:05 +08:00
Cnly 2fb994ad1d Ignore error from rows.Close()
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-08-01 12:23:58 +08:00
Cnly 1772d830da Variable and type clarifications
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-08-01 11:03:24 +08:00
Alex Chen 92db6cd0ea Fix index in invites_table.go (#770)
This PR fixes a possible typo in an index created in invites_table.go.

Signed-off-by: Alex Chen minecnly@gmail.com
2019-07-31 14:36:21 +01:00
Alex Chen 3e1abe9ad3 Fix /sync may contain duplicate EDUs and EDUs for left rooms (#752)
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
2019-07-31 14:20:11 +01:00
Cnly ac775bb79d Add more sanity checks
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-31 17:13:10 +08:00
Cnly c104599804 Merge branch 'master' into event-redaction 2019-07-27 19:18:00 +08:00
Cnly 3742874433 Fix arguments in selectEventsSQL
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-27 19:16:11 +08:00
Cnly 40fd47957a Implement event redaction
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-27 17:56:26 +08:00
Alex Chen e66933b108
Fix data races reported by go test -race ./... (#748) 2019-07-26 00:00:22 +08:00
Andrew Morgan e2251199a4
Lots of small typo fixes (#737) 2019-07-12 16:43:01 +01:00
Alex Chen 29841bed6b
Add typing notifications to /sync responses - fixes #635 (#718)
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.
2019-07-12 22:59:53 +08:00
Andrew Morgan 33a1392541
Encode URLs properly (#728)
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.
2019-07-03 16:38:50 +01:00
Andrew Morgan bc382bba46
Fix pipeline, emoji and syntax (#713)
Fixes #697

Switched to golangci-lint, fixes issues with buildkite and does some linting fixes to appease the new linters.
2019-06-19 14:05:03 +01:00
ruben 74827428bd use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00