Cnly
4a323f15a1
Merge 'upstream/master' into syncapi-typing-notifications-635
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-12 20:51:43 +08:00
Cnly
4e84c2f2e9
Docs and code cleanup
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-12 20:47:13 +08:00
Alex Chen
86e65bb22d
Add back missing returns for httputil.LogThenError calls ( #730 )
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-09 17:33:52 +01:00
Alex Chen
6106ec1399
Fix getAliasesForRoomID has no HTTP handler in aliasAPI ( #705 )
...
This PR adds back the HTTP handler for internal API GetAliasesForRoomID in roomserver, which seemed to be missing.
2019-07-09 17:13:43 +01:00
Anant Prakash
c725176878
Fix http responses in validateRecaptcha ( #431 )
...
fixes #421
2019-07-09 14:21:33 +01:00
Behouba Manassé
69f8d5a77e
Content-Disposition HTTP header in mediaapi's responses added ( #685 )
...
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
2019-07-08 14:06:17 +01:00
Alex Chen
da0dd06475
Update testfile and fix empty warning in show-expected-fail-tests.sh ( #729 )
...
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
2019-07-05 12:42:23 +01: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
1eb77b8161
Don't print Sending EDU if there is noone to send to ( #721 )
...
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).
2019-07-01 16:04:49 +01:00
Cnly
8ed82c0278
Merge branch 'master' into syncapi-typing-notifications-635
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-01 20:32:31 +08:00
Cnly
1be2089d96
Add newly passing tests to testfile
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-01 19:38:10 +08:00
Cnly
530ed11ecc
Refine docs
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-28 01:32:23 +08:00
Cnly
19f1a6fe0d
Remove users from typing list when typing status times out
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 16:11:29 +08:00
Cnly
d79a6a21c7
Userstreams should store and use complete pos, not pos update ("pos delta")
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 05:10:31 +08:00
Cnly
274db2fbaf
Fix zero value of currPos may be used in OnIncomingSyncRequest
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 05:00:48 +08:00
Cnly
6fd1c21207
Fix docs for SyncPosition.WithUpdates
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 04:48:14 +08:00
Cnly
aeceacd917
Make Notifier.CurrentPosition() respect stream lock
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 04:33:45 +08:00
Cnly
74fd292403
Fix latest sync pos used as since pos in requestpool.go
...
Previously, currPos, obtained using notifier.CurrentPosition(), is passed
to GetNotifyChannel. Since this is already the latest position on the
server, the client won't get updates until (1) a even newer event arrives at
the server, or (2) the /sync request times out.
(2) above is possible because when it times out, notifier calculates
currentSyncForUser based on syncReq, which contains the correct since pos
token that the client sent the server.
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 04:02:43 +08:00
Cnly
e7cf44946f
Fix necessary field not set properly in TypingEvent; clean up OutputTypingEvent
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 23:03:50 +08:00
Cnly
2a9dab21f8
Fix sync position with partial info used as complete one in syncserver and notifier
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 22:56:58 +08:00
Cnly
55219aa746
Better logging in typing event consumer
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 22:48:19 +08:00
Cnly
d3ee72c59b
Typing event consumer now supplies real, not bogus position to notifier
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 22:46:12 +08:00
Cnly
ad4f69a81c
Remove room ID from m.typing client events
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 22:38:30 +08:00
Cnly
badd360fe6
Add a simple test for EDU-only updates in notifier_test.go
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 18:00:50 +08:00
Cnly
18c59e68cd
Fix more linting issues and docs
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 17:46:08 +08:00
Cnly
e6870279ed
Fix syncapi/sync/notifier_test.go
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 17:45:25 +08:00
Cnly
e742b7d9b5
Add warning for OnNewEvent when no user to wake up
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 22:53:07 +08:00
Cnly
ba35a0a96d
Fix nil pointer and goroutine safety in typing cache
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 22:45:53 +08:00
Cnly
55a4e6061a
Fix linting
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 22:22:03 +08:00
Serra Allgood
a0dec456c1
rommserver/alias: Do not call appserviceAPI in GetRoomIDForAlias if local alias found #631 ( #702 )
...
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>
2019-06-25 13:43:18 +01:00
Alex Chen
7792f12e6f
Fix testfile path hardcoded in show-expected-fail-tests.sh ( #719 )
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 11:50:19 +01:00
Alex Chen
b88112b05d
Make federation state request 404 when event not in the room - fixes #625 ( #716 )
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 11:32:15 +01:00
Cnly
b896fdc537
Add typing notifications to /sync responses - fixes #635
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 15:28:52 +08:00
Andrew Morgan
eaf38ae87e
Not all systems have bash ( #720 )
...
As not all systems have bash.
Helpful for not making debugging alpine docker images a pain :>
2019-06-24 13:35:29 +01:00
Alex Chen
ce189a737d
Update dependency gomatrixserverlib to 178ed5e ( #695 )
...
Update dependency gomatrixserverlib to 178ed5e
2019-06-22 14:40:55 +01:00
Alex Chen
adaec7c8e7
Refine config and docs for sytest ( #714 )
...
This PR adds the "passed but expected fail" tests to testfile, as well as instructions on finding which tests to add for new PRs.
2019-06-21 16:49:37 +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
Andrew Morgan
7a2d5b17b9
Switch to Buildkite ( #712 )
2019-05-29 15:17:00 +01:00
Brendan Abolivier
bcd6bdb8de
Fix CircleCI badge ( #711 )
...
The current one is directed towards @anoadragon453's repo, not the main Matrix.org one.
2019-05-29 14:48:43 +01:00
Andrew Morgan
ade4b9c978
Run CircleCI on pull request branches ( #710 )
...
We were previously only running CircleCI on master, but we want it to PRs as well.
2019-05-29 11:34:36 +01:00
Andrew Morgan
c7c5e8d8e8
Add CircleCI build status
2019-05-29 10:54:44 +01:00
Andrew Morgan
1667a4b09f
Add SyTest support to CI ( #704 )
...
Adds SyTest CI through CircleCI.
Also need to add all the tests that currently pass to testfile, but I don't think that's a hard blocker for merging.
2019-05-24 15:00:03 +01:00
Brendan Abolivier
e1ec98e248
Update Docker files and remove references to gb ( #703 )
...
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.
2019-05-22 10:44:25 +01:00
ruben
74827428bd
use go module for dependencies ( #594 )
2019-05-21 21:56:55 +01:00
Andrew Morgan
4d588f7008
Add #dendrite-dev to the README ( #699 )
...
I suspect this is why we're getting a lot of people coming in to #dendrite asking dev-related questions.
2019-03-27 17:36:45 +00:00
Travis Ralston
f8f9965cc5
Ensure appservices have their devices checked ( #554 )
...
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.
2019-03-21 08:48:21 -06:00
Alex Chen
5d2d0484d1
Fix build conflict between docker environment and host - #596 ( #598 )
...
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-03-04 14:47:29 +00:00
Sumukha Pk
6baaf8c36c
Improved clarity for setup in INSTALL.md ( #691 )
...
* Improved clarity for setup in INSTALL.md
2019-03-04 14:26:30 +00:00
Andrew Morgan
ce9f3ea362
Bump to go version 1.10 ( #690 )
2019-01-31 11:14:16 +00:00
Aaron Raimist
76a81e51b3
Remove riot.im from the list of trusted ID servers in the default config ( #688 )
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-01-31 10:06:11 +00:00