1
0
Commit Graph

18521 Commits

Author SHA1 Message Date
Andrew Morgan
a97044a96f Merge commit 'e35d44c01' into dinsic
* commit 'e35d44c01':
2020-08-03 16:23:55 -07:00
Andrew Morgan
c9239b4af4 Merge commit '363082561' into dinsic
* commit '363082561':
  Convert the typing handler to async/await. (#7679)
2020-08-03 16:23:49 -07:00
Andrew Morgan
545423f064 Merge commit '96bc110a6' into dinsic
* commit '96bc110a6':
  Require parameterized package version to be at least 0.7.0. (#7680)
2020-08-03 16:23:45 -07:00
Andrew Morgan
5662b85fc1 Merge commit '5a5cf6460' into dinsic
* commit '5a5cf6460':
  Fix unread counts in sync
2020-08-03 16:23:41 -07:00
Andrew Morgan
d9a91426ba Merge commit '6418b0379' into dinsic
* commit '6418b0379':
  Ignore the UI Auth sessions when porting from sqlite to postgresql (#7711)
2020-08-03 16:23:38 -07:00
Andrew Morgan
5cf0efa05d Merge commit 'e07a8caf5' into dinsic
* commit 'e07a8caf5':
  Add support for using rust-python-jaeger-reporter (#7697)
2020-08-03 16:23:04 -07:00
Andrew Morgan
6553158b20 Merge commit 'b44bdd7f7' into dinsic
* commit 'b44bdd7f7':
  Support running multiple media repos. (#7706)
2020-08-03 16:22:58 -07:00
Andrew Morgan
3261eb71a6 Merge commit '434716e1d' into dinsic
* commit '434716e1d':
  Fetch from the r0 media path instead of the unspecced v1. (#7714)
2020-08-03 16:22:52 -07:00
Andrew Morgan
09ddede03d Merge commit '890c0c041' into dinsic
* commit '890c0c041':
  Update postgres in the Docker compose example to 12-alpine. (#7696)
2020-08-03 16:22:47 -07:00
Andrew Morgan
e64449b7be Merge commit '46613aaf7' into dinsic
* commit '46613aaf7': (27 commits)
  Incorporate review
  Lint
  Incorporate review bits
  Pre-populate the unread_count column
  Don't update the schema version
  Use attr instead of a dict
  Lint
  Test that a mark_unread action updates the right counter when using a slave store
  Remove debug logging
  Test that a mark_unread action updates the right counter
  Fix summary rotation
  Log for invalid values of notif
  Fix SQL
  Fix schema update
  Lint
  Save the count of unread messages to event_push_summary
  Actually act on mark_unread
  Appease mypy
  Lint
  Use temporary prefixes as per the MSC
  ...
2020-08-03 16:22:42 -07:00
Andrew Morgan
100a7ea06e Merge commit 'e452973fd' into dinsic
* commit 'e452973fd':
  fix broken link in sample config (#7712)
2020-08-03 16:22:38 -07:00
Andrew Morgan
c6011c3ce8 Merge commit 'f6f7511a4' into dinsic
* commit 'f6f7511a4':
  Refactor getting replication updates from database. (#7636)
2020-08-03 16:22:34 -07:00
Andrew Morgan
5c4e0e62bc Merge commit '231252516' into dinsic
* commit '231252516':
  Fix "argument of type 'ObservableDeferred' is not iterable" error (#7708)
2020-08-03 16:22:25 -07:00
Andrew Morgan
3017e1d21b Merge commit '5c5516f80' into dinsic
* commit '5c5516f80':
  Add instructions for authing with Keycloak via OpenID (#7659)
2020-08-03 16:22:18 -07:00
Andrew Morgan
ca1ffa9e3d Merge commit 'ac51bd581' into dinsic
* commit 'ac51bd581':
  Include a user agent in federation requests. (#7677)
2020-08-03 16:22:05 -07:00
Andrew Morgan
48e7f210c6 Merge commit 'a3f11567d' into dinsic
* commit 'a3f11567d':
  Replace all remaining six usage with native Python 3 equivalents (#7704)
2020-08-03 16:15:34 -07:00
Andrew Morgan
b98f60df3a Merge commit '98c4e35e3' into dinsic
* commit '98c4e35e3':
  Convert the device message and pagination handlers to async/await. (#7678)
2020-08-03 16:06:45 -07:00
Andrew Morgan
70032b3ddc Merge commit '03619324f' into dinsic
* commit '03619324f':
  Create a ListenerConfig object (#7681)
  Fix changelog wording
  1.15.1
  Wrap register_device coroutine in an ensureDeferred (#7684)
  Ensure the body is a string before comparing push rules. (#7701)
  Ensure etag is a string for GET room_keys/version response (#7691)
  Update m.id.phone to use 'phone' instead of 'number' (#7687)
  Fix "There was no active span when trying to log." error (#7698)
  Enable 3PID add/bind/unbind endpoints on r0 routes
  Discard RDATA from already seen positions. (#7648)
  Replace iteritems/itervalues/iterkeys with native versions. (#7692)
  Fix warnings about losing log context during UI auth. (#7688)
  Fix a typo when comparing the URI & method during UI Auth. (#7689)
  Remove "user_id" from GET /presence. (#7606)
  Increase the default SAML session expirary time to 15 minutes. (#7664)
  fix typo in sample_config.yaml (#7652)
  Take out a lock before modifying _CACHES (#7663)
  Add option to enable encryption by default for new rooms (#7639)
  Clean-up the fallback login code. (#7657)
2020-08-03 16:06:22 -07:00
Andrew Morgan
21821c076a Add option to autobind user's email on registration (#51)
Adds an option, `bind_new_user_emails_to_sydent`, which uses Sydent's [internal bind api](https://github.com/matrix-org/sydent#internal-bind-and-unbind-api) to automatically bind email addresses of users immediately after they register.

This is quite enterprise-specific, but could be generally useful to multiple organizations. This aims to solve the problem of requiring users to verify their email twice when using the functionality of an identity server in a corporate deployment - where both the homeserver and identity server are controlled. It does with while eliminating the need for the `account_threepid_delegates.email` option, which historically has been a very complicated option to reason about.
2020-07-02 11:01:02 +01:00
Andrew Morgan
4200f54ca7 Merge pull request #50 from matrix-org/dinsic-release-v1.15.x
Merge mainline release v1.15.1 into dinsic
2020-06-24 15:43:15 +01:00
Andrew Morgan
b21331359b Changelog 2020-06-24 13:13:59 +01:00
Andrew Morgan
a7d49db74f Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into dinsic-release-v1.15.x
* 'release-v1.15.0' of github.com:matrix-org/synapse: (55 commits)
  1.15.0
  Fix some attributions
  Update CHANGES.md
  1.15.0rc1
  Revert "1.15.0rc1"
  1.15.0rc1
  Fix bug in account data replication stream. (#7656)
  Convert the registration handler to async/await. (#7649)
  Accept device information at the login fallback endpoint. (#7629)
  Convert user directory handler and related classes to async/await. (#7640)
  Add an option to disable autojoin for guest accounts (#6637)
  Clarifications to the admin api documentation (#7647)
  Update to the stable SSO prefix for UI Auth. (#7630)
  Fix type information on `assert_*_is_admin` methods (#7645)
  Remove some unused constants. (#7644)
  Typo fixes.
  Allow new users to be registered via the admin API even if the monthly active user limit has been reached (#7263)
  Add device management to admin API (#7481)
  Attempt to fix PhoneHomeStatsTestCase.test_performance_100 being flaky. (#7634)
  Support CS API v0.6.0 (#6585)
  ...
2020-06-24 12:07:41 +01:00
Andrew Morgan
7da71b701e Prevent M_USER_IN_USE from being raised by registration methods until after email has been verified (#48)
* Just ignore the `username` parameter on registration as it's not used by DINUM
* Have `/register/available` always return `true`
2020-06-22 12:47:09 +01:00
Andrew Morgan
53949a908f Add a bulk user info endpoint and deprecate the old one (#46)
The current `/user/<user_id>/info` API was useful in that it could be used by any user to lookup whether another user was deactivate or expired. However, it was impractical as it only allowed for a single lookup at once. Clients trying to use this API were met with speed issues as they tried to query this information for all users in a room.

This PR adds an equivalent CS and Federation API that takes a list of user IDs, and returning a mapping from user ID to info dictionary.

Note that the federation in this PR was a bit trickier than in the original #12 as we can no longer use a federation query, as those don't allow for JSON bodies - which we require to pass a list of user IDs. Instead we do the whole thing of adding a method to transport/client and transport/server.

This PR also adds unittests. The earlier PR used Sytest, presumably for testing across federation, but as this is Synapse-specific that felt a little gross. Unit tests for the deprecated endpoint have not been added.
2020-06-19 16:17:13 +01:00
Andrew Morgan
6708163271 Performance improvements to marking expired users as inactive (#47)
This is a performance-related improvement to #13, which queried and hid active *and* already inactive users, one-by-one. This PR updates the code to query only **active**, expired users, all at once, and then mark them as inactive, all at once.
2020-06-19 16:14:37 +01:00
Brendan Abolivier
e35d44c01d Merge pull request #7716 from matrix-org/babolivier/unread_fix
Fix unread counts in sync
2020-06-17 15:44:15 +01:00
Patrick Cloke
3630825612 Convert the typing handler to async/await. (#7679) 2020-06-17 10:37:59 -04:00
Oleg Girko
96bc110a68 Require parameterized package version to be at least 0.7.0. (#7680)
Older versions of `parameterized` package have no `parameterized_class` decorator. This decorator is used in tests.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2020-06-17 15:31:40 +01:00
Brendan Abolivier
5a5cf6460e Fix unread counts in sync
* Always return an unread_count in get_unread_event_push_actions_by_room_for_user
* Don't always expect unread_count to be there so we don't take out sync entirely if something goes wrong
2020-06-17 15:10:44 +01:00
Patrick Cloke
6418b0379f Ignore the UI Auth sessions when porting from sqlite to postgresql (#7711) 2020-06-17 10:01:18 -04:00
Erik Johnston
e07a8caf58 Add support for using rust-python-jaeger-reporter (#7697) 2020-06-17 14:13:41 +01:00
Erik Johnston
b44bdd7f7b Support running multiple media repos. (#7706)
This requires a new config option to specify which media repo should be
responsible for running background jobs to e.g. clear out expired URL
preview caches.
2020-06-17 14:13:30 +01:00
Patrick Cloke
434716e1d3 Fetch from the r0 media path instead of the unspecced v1. (#7714) 2020-06-17 08:36:46 -04:00
lub
890c0c041d Update postgres in the Docker compose example to 12-alpine. (#7696) 2020-06-17 08:29:08 -04:00
Andrew Morgan
f975330925 Merge pull request #45 from matrix-org/dinsic-release-v1.14.x
Merge mainline release v1.14.0 into dinsic
2020-06-17 11:55:03 +01:00
Brendan Abolivier
46613aaf79 Implement unread counter (MSC2625) (#7673)
Implementation of https://github.com/matrix-org/matrix-doc/pull/2625
2020-06-17 10:58:32 +01:00
Richard van der Hoff
e452973fd2 fix broken link in sample config (#7712) 2020-06-16 19:50:16 +01:00
Erik Johnston
f6f7511a4c Refactor getting replication updates from database. (#7636)
The aim here is to make it easier to reason about when streams are limited and when they're not, by moving the logic into the database functions themselves. This should mean we can kill of `db_query_to_update_function` function.
2020-06-16 17:10:28 +01:00
Patrick Cloke
231252516c Fix "argument of type 'ObservableDeferred' is not iterable" error (#7708) 2020-06-16 12:01:18 -04:00
hungrymonkey
5c5516f80e Add instructions for authing with Keycloak via OpenID (#7659) 2020-06-16 11:28:21 -04:00
Patrick Cloke
ac51bd581a Include a user agent in federation requests. (#7677) 2020-06-16 10:43:29 -04:00
Dagfinn Ilmari Mannsåker
a3f11567d9 Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
Patrick Cloke
98c4e35e3c Convert the device message and pagination handlers to async/await. (#7678) 2020-06-16 08:06:17 -04:00
Richard van der Hoff
03619324fc Create a ListenerConfig object (#7681)
This ended up being a bit more invasive than I'd hoped for (not helped by
generic_worker duplicating some of the code from homeserver), but hopefully
it's an improvement.

The idea is that, rather than storing unstructured `dict`s in the config for
the listener configurations, we instead parse it into a structured
`ListenerConfig` object.
2020-06-16 12:44:07 +01:00
Brendan Abolivier
789606577a Merge branch 'master' into develop 2020-06-16 10:36:29 +01:00
Brendan Abolivier
0fc5575c5b Fix changelog wording v1.15.1 2020-06-16 10:31:04 +01:00
Brendan Abolivier
65eb078498 1.15.1 2020-06-16 10:28:58 +01:00
Andrew Morgan
3e6b5bba71 Wrap register_device coroutine in an ensureDeferred (#7684)
Fixes https://github.com/matrix-org/synapse/issues/7683

Broke in: #7649

We had a `yield` acting on a coroutine. To be fair this one is a bit difficult to notice as there's a function in the middle that just passes the coroutine along.
2020-06-16 10:13:59 +01:00
Patrick Cloke
cc32fa7358 Ensure the body is a string before comparing push rules. (#7701) 2020-06-15 16:20:34 -04:00
Hubert Chathi
2b2344652b Ensure etag is a string for GET room_keys/version response (#7691) 2020-06-15 13:42:44 -04:00