Brendan Abolivier
70d17c53dc
Apply suggestion from review
2020-05-21 16:57:54 +02:00
Brendan Abolivier
d3f609f926
Fix bogus call to run_as_background_process
2020-05-15 18:27:08 +02:00
Brendan Abolivier
cdd6fdd736
Fix logging context mess
2020-05-15 12:53:37 +02:00
Brendan Abolivier
14e77a5ffb
Add failure information to failure log
2020-05-14 18:27:27 +02:00
Brendan Abolivier
d25b036d76
Apparently looping calls must use deferreds
2020-05-08 15:34:30 +02:00
Brendan Abolivier
da73470ffb
Don't log a warning on NotRetryingDestination
...
Otherwise we're going to be logging `Failed to handle device list update
for @user:example.com` every 30s for every remote we're not retrying
because of backoff.
2020-05-07 17:54:39 +02:00
Brendan Abolivier
c62c77d704
Add a looping call to retry resyncs
2020-05-07 17:13:09 +02:00
Brendan Abolivier
c06f4934ec
Mark a remote user's device list as stale if we failed to sync it
2020-05-07 16:38:20 +02:00
Patrick Cloke
eed7c5b89e
Convert auth handler to async/await ( #7261 )
2020-04-15 12:40:18 -04:00
Andrew Morgan
104844c1e1
Add explanatory comment
2020-03-30 14:00:11 +01:00
David Baker
7406477525
black
2020-03-30 10:18:33 +01:00
David Baker
9fc588e6dc
Just add own user ID to the list we track device changes for
2020-03-30 10:11:26 +01:00
David Baker
16ee97988a
Fix undefined variable & remove debug logging
2020-03-27 12:39:54 +00:00
David Baker
a07e03ce90
black
2020-03-27 12:35:32 +00:00
David Baker
09cc058a4c
Always send the user updates to their own device list
...
This will allow clients to notify users about new devices even if
the user isn't in any rooms (yet).
2020-03-27 12:26:47 +00:00
Patrick Cloke
509e381afa
Clarify list/set/dict/tuple comprehensions and enforce via flake8 ( #6957 )
...
Ensure good comprehension hygiene using flake8-comprehensions.
2020-02-21 07:15:07 -05:00
Patrick Cloke
a92e703ab9
Reject device display names that are too long ( #6882 )
...
* Reject device display names that are too long.
Too long is currently defined as 100 characters in length.
* Add a regression test for rejecting a too long device display name.
2020-02-10 16:35:26 -05:00
Erik Johnston
21db35f77e
Add support for putting fed user query API on workers ( #6873 )
2020-02-07 15:45:39 +00:00
Erik Johnston
a58860e480
Check sender_key matches on inbound encrypted events. ( #6850 )
...
If they don't then the device lists are probably out of sync.
2020-02-05 14:02:39 +00:00
Hubert Chathi
6f4bc6d01d
Merge branch 'develop' into cross-signing_federation
2019-10-31 22:38:21 -04:00
Erik Johnston
dfe0cd71b6
Merge pull request #6294 from matrix-org/erikj/add_state_storage
...
Add StateGroupStorage interface
2019-10-31 16:17:53 +01:00
Andrew Morgan
54fef094b3
Remove usage of deprecated logger.warn method from codebase ( #6271 )
...
Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
2019-10-31 10:23:24 +00:00
Erik Johnston
69f0054ce6
Port to use state storage
2019-10-30 14:46:54 +00:00
Hubert Chathi
1fabf82d50
update to work with newer code, and fix formatting
2019-10-22 21:44:58 -04:00
Hubert Chathi
8d3542a64e
implement federation parts of cross-signing
2019-10-22 19:04:35 -04:00
Hubert Chathi
faf72a4c40
Merge branch 'develop' into cross-signing_keys
2019-09-04 19:12:29 -04:00
Jorik Schellekens
a90d16dabc
Opentrace device lists ( #5853 )
...
Trace device list changes.
2019-09-03 10:21:30 +01:00
Hubert Chathi
336c546d6a
Merge branch 'cross-signing_hidden' into cross-signing_keys
2019-08-01 16:31:40 -04:00
Jorik Schellekens
85b0bd8fe0
Update the device list cache when keys/query is called ( #5693 )
2019-07-29 16:34:44 +01:00
Hubert Chathi
c659b9f94f
allow uploading keys for cross-signing
2019-07-25 11:08:24 -04:00
Amber Brown
4806651744
Replace returnValue with return ( #5736 )
2019-07-23 23:00:55 +10:00
Erik Johnston
806a06daf2
Rename get_users_whose_devices_changed
2019-06-26 19:39:19 +01:00
Erik Johnston
a2f6d31a63
Refactor get_user_ids_changed to pull less from DB
...
When a client asks for users whose devices have changed since a token we
used to pull *all* users from the database since the token, which could
easily be thousands of rows for old tokens.
This PR changes this to only check for changes for users the client is
actually interested in.
Fixes #5553
2019-06-26 12:03:44 +01:00
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
2019-06-20 19:32:02 +10:00
Erik Johnston
469b66c102
Merge pull request #4829 from matrix-org/erikj/device_list_seen_updates
...
When re-syncing device lists reset the state
2019-03-08 09:54:54 +00:00
Erik Johnston
d42b41544a
When re-syncing device lists reset the state
...
We keep track of what stream IDs we've seen so that we know what updates
we've handled or missed. If we re-sync we don't know if the updates
we've seen are included in the re-sync (there may be a race), so we
should reset the seen updates.
2019-03-07 16:04:24 +00:00
Erik Johnston
c633fc02d7
Add some debug logging for device list handling
2019-03-07 15:58:03 +00:00
Erik Johnston
bfa7d46a10
Allow /keys/{changes,query} API to run on worker
2019-03-04 18:30:01 +00:00
Erik Johnston
157e5a8f27
Split DeviceHandler into master and worker
2019-03-04 18:29:26 +00:00
Erik Johnston
94960cef03
pep8
2019-02-18 15:24:13 +00:00
Erik Johnston
e07cc31cb8
Correctly handle HttpResponseException
2019-02-18 14:55:09 +00:00
Erik Johnston
7fc1196a36
Correctly handle RequestSendFailed exceptions
...
This mainly reduces the number of exceptions we log.
2019-02-14 14:01:04 +00:00
Richard van der Hoff
05e1296649
don't store more remote device lists if they have more than 1K devices ( #4397 )
2019-01-16 23:14:11 +00:00
Amber Brown
b37c472419
Rename async to async_helpers because `async` is a keyword on Python 3.7 ( #3678 )
2018-08-10 23:50:21 +10:00
Matthew Hodgson
ea752bdd99
s/becuase/because/g
2018-07-10 17:58:18 +01:00
Amber Brown
49af402019
run isort
2018-07-09 16:09:20 +10:00
Amber Brown
c936a52a9e
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy ( #3307 )
2018-05-31 19:03:47 +10:00
Adrian Tschira
933bf2dd35
replace some iteritems with six
...
Signed-off-by: Adrian Tschira <nota@notafile.com>
2018-05-19 17:59:26 +02:00
NotAFile
2cc9f76bc3
replace old style error catching with 'as' keyword
...
This is both easier to read and compatible with python3 (not that that
matters)
Signed-off-by: Adrian Tschira <nota@notafile.com>
2018-03-15 16:11:17 +01:00
Erik Johnston
cb9f8e527c
s/replication_client/federation_client/
2018-03-13 13:26:52 +00:00