MatrixSynapse/synapse
Matthew Hodgson ee238254a0 Query the device lists of users when they are invited to a room.
Previously we only queried the device list when the user joined the room; now we
do it when they are invited too.  This means that new messages can be encrypted
for the devices of the invited user as of the point they were invited.

WARNING: This commit has two major problems however:
 1. If the invited user adds devices after being invited but before joining, the
    device-list will not be updated to the other servers in the room (as we don't
    know who those servers are).
 2. This introduces a regression, as previously the device-list would be correctly
    updated when when user joined the room.  However, this resync doesn't happen
    now, so devices which joined after the invite and before the join may never
    be added to the device-list.

This is being merged for DINSIC given the edge case of adding devices between
invite & join is pretty rare in their use case, but before it can be merged to
synapse in general we need to at least re-sync the devicelist when the user joins
or to implement some kind of pubsub mechanism to let interested servers subscribe
to devicelist updates on other servers irrespective of user join/invite membership.

This was originally https://github.com/matrix-org/synapse/pull/3484
2018-07-06 16:29:08 +02:00
..
api SECURITY UPDATE: Prevent unauthorised users from setting state events in a room 2018-06-22 17:04:50 +01:00
app Merge pull request #3264 from matrix-org/neil/sign-up-stats 2018-06-01 13:42:01 +00:00
appservice Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background 2018-04-27 14:31:23 +01:00
config SECURITY UPDATE: Prevent unauthorised users from setting state events in a room 2018-06-22 17:04:50 +01:00
crypto Fixes #3135 - Replace _OpenSSLECCurve with crypto.get_elliptic_curve (#3157) 2018-04-30 16:21:11 +01:00
events 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
federation federation/send_queue.py: fix usage of LaterGauge 2018-06-03 14:16:17 +03:00
groups Replace some more comparisons with six 2018-05-19 17:56:31 +02:00
handlers Query the device lists of users when they are invited to a room. 2018-07-06 16:29:08 +02:00
http update to more consistently use seconds in any metrics or logging 2018-05-28 19:39:27 +10:00
metrics Hopefully, fix LaterGuage error handling 2018-06-04 15:59:14 +01:00
module_api Delete devices in various logout situations 2017-11-29 16:44:35 +00:00
push 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
replication Fix replication metrics 2018-06-04 16:23:05 +01:00
rest SECURITY UPDATE: Prevent unauthorised users from setting state events in a room 2018-06-22 17:04:50 +01:00
rulecheck Update with documentation suggestions 2018-05-18 16:12:22 +01:00
server_notices Avoid sending consent notice to guest users 2018-05-25 11:36:43 +01:00
static/client Updates to fallback CAS login to do new token login 2015-11-06 09:57:17 +00:00
storage SECURITY UPDATE: Prevent unauthorised users from setting state events in a room 2018-06-22 17:04:50 +01:00
streams replace 'except:' with 'except Exception:' 2017-10-23 15:52:32 +01:00
util SECURITY UPDATE: Prevent unauthorised users from setting state events in a room 2018-06-22 17:04:50 +01:00
__init__.py v0.31.2 2018-06-14 16:24:32 +01:00
event_auth.py Make default state_default 50 2018-06-14 12:38:09 +01:00
notifier.py cleanup pep8 errors 2018-05-22 16:54:22 -05:00
python_dependencies.py replacing portions 2018-05-21 19:47:37 -05:00
server.py Stub out ServerNoticesSender on the workers 2018-05-22 11:54:51 +01:00
server.pyi Send users a server notice about consent 2018-05-22 11:54:51 +01:00
state.py 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
types.py fix user_id / user confusion 2018-05-04 00:53:56 +01:00
visibility.py Remove preserve_context_over_{fn, deferred} 2017-11-14 11:22:42 +00:00