Tulir Asokan
08a269e2af
Merge remote-tracking branch 'upstream/release-v1.49'
2021-12-07 16:54:59 +02:00
David Robertson
14d593f72d
Refactors in _generate_sync_entry_for_rooms
( #11515 )
...
* Move sync_token up to the top
* Pull out _get_ignored_users
* Try to signpost the body of `_generate_sync_entry_for_rooms`
* Pull out _calculate_user_changes
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2021-12-07 12:42:05 +00:00
David Robertson
9c55dedc8c
Correctly ignore invites from ignored users ( #11511 )
2021-12-07 11:24:31 +00:00
David Robertson
d26808dd85
Comments on the /sync tentacles ( #11494 )
...
This mainly consists of docstrings and inline comments. There are one or two type annotations and variable renames thrown in while I was here.
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2021-12-02 20:58:32 +00:00
Tulir Asokan
9f4fa40b64
Merge remote-tracking branch 'upstream/release-v1.48'
2021-11-25 18:33:37 +02:00
Patrick Cloke
a19d01c3d9
Support filtering by relations per MSC3440 ( #11236 )
...
Adds experimental support for `relation_types` and `relation_senders`
fields for filters.
2021-11-09 08:10:58 -05:00
Tulir Asokan
8631aaeb5a
Merge remote-tracking branch 'upstream/release-v1.44'
2021-09-29 16:08:42 +03:00
Patrick Cloke
4054dfa409
Add type hints for event streams. ( #10856 )
2021-09-21 13:34:26 -04:00
Patrick Cloke
b3590614da
Require type hints in the handlers module. ( #10831 )
...
Adds missing type hints to methods in the synapse.handlers
module and requires all methods to have type hints there.
This also removes the unused construct_auth_difference method
from the FederationHandler.
2021-09-20 08:56:23 -04:00
Tulir Asokan
95b56c0fe3
Merge remote-tracking branch 'upstream/release-v1.43'
2021-09-18 11:32:30 -04:00
David Robertson
b4c1af8cea
Merge branch 'release-v1.43' into develop
2021-09-17 12:15:17 +01:00
Erik Johnston
9a6f4a684f
Cleanup opentracing logging for syncs ( #10828 )
...
We added a bunch of spans in #10704 , but this ended up adding a lot of
redundant spans for rooms where nothing changed, so instead we only
start the span if there might be something interesting going on.
2021-09-15 17:14:25 +01:00
Patrick Cloke
8c7a531e27
Use direct references for some configuration variables (part 2) ( #10812 )
2021-09-15 08:34:52 -04:00
Tulir Asokan
1e11b73441
Merge remote-tracking branch 'upstream/release-v1.43'
2021-09-14 10:00:40 -04:00
Azrenbeth
f1c6b76418
Add logging to help debug #9424 ( #10704 )
2021-09-06 16:08:25 +01:00
Tulir Asokan
c75eed92c9
Merge remote-tracking branch 'upstream/release-v1.42'
2021-09-01 15:54:42 +03:00
Patrick Cloke
bd7d398b05
Additional type hints for the sync REST servlet. ( #10666 )
2021-08-23 08:14:42 -04:00
Patrick Cloke
000aa89be6
Do not include rooms with an unknown room version in a sync response. ( #10644 )
...
A user will still see this room if it is in a local cache, but it will
not reappear if clearing the cache and reloading.
2021-08-19 11:12:55 -04:00
Tulir Asokan
f285b4200c
Merge remote-tracking branch 'upstream/release-v1.41'
2021-08-18 18:12:12 +03:00
Patrick Cloke
bec01c0758
Convert room member storage tuples to attrs. ( #10629 )
...
Instead of using namedtuples. This helps with asserting type hints
and code completion.
2021-08-18 09:22:07 -04:00
Patrick Cloke
6a5f8fbcda
Use auto-attribs for attrs classes for sync. ( #10630 )
2021-08-18 07:27:32 -04:00
Richard van der Hoff
4b10880da3
Make sync response cache time configurable. ( #10513 )
2021-08-03 14:45:04 +01:00
Tulir Asokan
a9208002c8
Merge remote-tracking branch 'upstream/release-v1.39'
2021-07-28 15:44:01 +03:00
Andrew Morgan
74d09a43d9
Always communicate device OTK counts to clients ( #10485 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2021-07-27 14:36:38 +01:00
Tulir Asokan
9754df5623
Merge remote-tracking branch 'upstream/release-v1.39'
2021-07-20 16:33:01 +03:00
Jonathan de Jong
95e47b2e78
[pyupgrade] synapse/
( #10348 )
...
This PR is tantamount to running
```
pyupgrade --py36-plus --keep-percent-format `find synapse/ -type f -name "*.py"`
```
Part of #9744
2021-07-19 15:28:05 +01:00
Jonathan de Jong
98aec1cc9d
Use inline type hints in handlers/
and rest/
. ( #10382 )
2021-07-16 18:22:36 +01:00
Tulir Asokan
9e81bc6b08
Merge remote-tracking branch 'upstream/release-v1.37'
2021-06-24 13:18:40 +03:00
Richard van der Hoff
fcf3c7032b
Ensure that we do not cache empty sync responses after a timeout ( #10158 )
...
Fixes #8518 by telling the ResponseCache not to cache the /sync response if the next_batch param is the same as the since token.
2021-06-17 16:23:11 +01:00
Sorunome
d936371b69
Implement knock feature ( #6739 )
...
This PR aims to implement the knock feature as proposed in https://github.com/matrix-org/matrix-doc/pull/2403
Signed-off-by: Sorunome mail@sorunome.de
Signed-off-by: Andrew Morgan andrewm@element.io
2021-06-09 19:39:51 +01:00
Tulir Asokan
8d96b324dc
Merge remote-tracking branch 'upstream/release-v1.36'
2021-06-08 16:24:37 +03:00
Richard van der Hoff
fa1db8f156
Delete completes to-device messages earlier in /sync ( #10124 )
...
I hope this will improve
https://github.com/matrix-org/synapse/issues/9564 .
2021-06-07 09:19:06 +01:00
Erik Johnston
4deaebfe00
Make /sync do less state res ( #10102 )
2021-06-02 15:48:17 +01:00
Tulir Asokan
2d57abd6b7
Merge remote-tracking branch 'upstream/release-v1.34.0'
2021-05-12 19:12:46 +03:00
Erik Johnston
d0aee697ac
Use get_current_users_in_room from store and not StateHandler ( #9910 )
2021-05-05 16:49:34 +01:00
Tulir Asokan
c9cee6c534
Merge remote-tracking branch 'upstream/release-v1.33.0'
2021-04-28 14:15:25 +03:00
Richard van der Hoff
294c675033
Remove synapse.types.Collection
( #9856 )
...
This is no longer required, since we have dropped support for Python 3.5.
2021-04-22 16:43:50 +01:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
...
Part of #9744
Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
2021-04-14 15:34:27 +01:00
Tulir Asokan
dbe12b3eb1
Merge remote-tracking branch 'upstream/release-v1.32.0'
2021-04-13 16:44:48 +03:00
Jonathan de Jong
2ca4e349e9
Bugbear: Add Mutable Parameter fixes ( #9682 )
...
Part of #9366
Adds in fixes for B006 and B008, both relating to mutable parameter lint errors.
Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
2021-04-08 22:38:54 +01:00
Patrick Cloke
44bb881096
Add type hints to expiring cache. ( #9730 )
2021-04-06 08:58:18 -04:00
Erik Johnston
33548f37aa
Improve tracing for to device messages ( #9686 )
2021-04-01 17:08:21 +01:00
Tulir Asokan
7def4428cf
Merge remote-tracking branch 'upstream/release-v1.31.0'
2021-03-30 14:03:23 +03:00
Patrick Cloke
7e8dc9934e
Add a type hints for service notices to the HomeServer object. ( #9675 )
2021-03-24 06:48:46 -04:00
Erik Johnston
ad721fc559
Fix bad naming of storage function ( #9637 )
...
We had two functions named `get_forward_extremities_for_room` and
`get_forward_extremeties_for_room` that took different paramters. We
rename one of them to avoid confusion.
2021-03-17 13:20:08 +00:00
Tulir Asokan
8b753230af
Merge remote-tracking branch 'upstream/release-v1.30.0'
2021-03-16 16:58:38 +02:00
Jonathan de Jong
d6196efafc
Add ResponseCache tests. ( #9458 )
2021-03-08 14:00:07 -05:00
Patrick Cloke
aee10768d8
Revert "Fix #8518 (sync requests being cached wrongly on timeout) ( #9358 )"
...
This reverts commit f5c93fc993
.
This is being backed out due to a regression (#9507 ) and additional
review feedback being provided.
2021-03-02 09:43:34 -05:00
Jonathan de Jong
f5c93fc993
Fix #8518 (sync requests being cached wrongly on timeout) ( #9358 )
...
This fixes #8518 by adding a conditional check on `SyncResult` in a function when `prev_stream_token == current_stream_token`, as a sanity check. In `CachedResponse.set.<remove>()`, the result is immediately popped from the cache if the conditional function returns "false".
This prevents the caching of a timed-out `SyncResult` (that has `next_key` as the stream key that produced that `SyncResult`). The cache is prevented from returning a `SyncResult` that makes the client request the same stream key over and over again, effectively making it stuck in a loop of requesting and getting a response immediately for as long as the cache keeps those values.
Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
2021-02-24 13:57:00 +00:00
Tulir Asokan
f6684e4e55
Merge remote-tracking branch 'upstream/release-v1.28.0'
2021-02-19 15:17:45 +02:00