Jeremy Cline
cafb8de132
Unfreeze event before serializing with ujson
...
In newer versions of https://github.com/esnme/ultrajson , ujson does not
serialize frozendicts (introduced in esnme/ultrajson@53f85b1 ). Although
the PyPI version is still 1.35, Fedora ships with a build from commit
esnme/ultrajson@2f1d487 . This causes the serialization to fail if the
distribution-provided package is used.
This runs the event through the unfreeze utility before serializing it.
Thanks to @ignatenkobrain for tracking down the root cause.
fixes #2351
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
2017-09-30 11:22:37 -04:00
Erik Johnston
8090fd4664
Fix /joined_members to work with AS users
2017-09-28 10:09:32 +01:00
Erik Johnston
adec03395d
Fix bug where /joined_members didn't check user was in room
2017-09-27 15:14:39 +01:00
David Baker
6cd5fcd536
Make the spam checker a module
2017-09-26 19:20:23 +01:00
Erik Johnston
17b8e2bd02
Add remove room API
2017-09-26 15:52:41 +01:00
Erik Johnston
95298783bb
Add is_publicised to group summary
2017-09-26 11:04:37 +01:00
Erik Johnston
e3edca3b5d
Refactor to speed up incremental syncs
2017-09-25 17:35:39 +01:00
Erik Johnston
3166ed55b2
Fix device list when rejoining room ( #2461 )
2017-09-22 14:44:17 +01:00
Richard van der Hoff
aa620d09a0
Add a config option to block all room invites ( #2457 )
...
- allows sysadmins the ability to lock down their servers so that people can't
send their users room invites.
2017-09-19 16:08:14 +01:00
Richard van der Hoff
2eabdf3f98
add some comments to on_exchange_third_party_invite_request
2017-09-19 12:20:36 +01:00
Richard van der Hoff
5ed109d59f
PoC for filtering spammy events ( #2456 )
...
Demonstration of how you might add some hooks to filter out spammy events.
2017-09-19 12:20:11 +01:00
Erik Johnston
93e504d04e
Ensure that creator of group sees group down /sync
2017-09-19 11:08:16 +01:00
Erik Johnston
b5feaa5a49
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/groups_merged
2017-09-19 11:07:45 +01:00
Richard van der Hoff
3f405b34e9
Fix overzealous kicking of guest users ( #2453 )
...
We should only kick guest users if the guest access event is authorised.
2017-09-19 08:52:52 +01:00
Erik Johnston
2d1b7955ae
Don't filter out current state events from timeline
2017-09-18 17:13:03 +01:00
Erik Johnston
d6dadd95ac
Correctly handle leaving room in /key/changes
2017-09-18 15:38:22 +01:00
Erik Johnston
4a94eb3ea4
Fix typo
2017-09-15 09:56:54 +01:00
Erik Johnston
3a0cee28d6
Actually hook leave notifs up
2017-09-14 11:49:37 +01:00
Erik Johnston
4f845a0713
Handle joining/leaving rooms in /keys/changes
2017-09-13 16:28:08 +01:00
Erik Johnston
473700f016
Get left rooms
2017-09-13 15:13:41 +01:00
Erik Johnston
9ce866ed4f
In sync handle device lists for newly joined/left rooms
2017-09-12 16:44:26 +01:00
Erik Johnston
69ef4987a6
Add left section to /keys/changes
2017-09-08 14:44:36 +01:00
Erik Johnston
53cc8ad35a
Send down device list change notif when member leaves/rejoins room
2017-09-07 15:08:39 +01:00
Erik Johnston
4a9b1cf253
Add user profiles to summary from group server
2017-08-25 16:23:58 +01:00
Erik Johnston
258409ef61
Fix typos and reinherit
2017-08-25 14:45:20 +01:00
Erik Johnston
bf81f3cf2c
Split out profile handler to fix tests
2017-08-25 14:34:56 +01:00
Erik Johnston
27ebc5c8f2
Add remote profile cache
2017-08-25 11:25:47 +01:00
Erik Johnston
ba3ff7918b
Fixup
2017-08-11 13:42:42 +01:00
Erik Johnston
ef8e578677
Add bulk group publicised lookup API
2017-08-09 13:36:22 +01:00
Erik Johnston
05e21285aa
Store whether the user wants to publicise their membership of a group
2017-08-08 13:01:46 +01:00
Erik Johnston
a1e67bcb97
Remove stale TODO comments
2017-08-04 10:07:10 +01:00
Erik Johnston
d5e32c843f
Correctly add joins to correct segment
2017-07-24 13:31:26 +01:00
Erik Johnston
96917d5552
Merge pull request #2378 from matrix-org/erikj/group_sync_support
...
Add groups to sync stream
2017-07-21 11:05:39 +01:00
Erik Johnston
960dae3340
Add notifier
2017-07-20 17:14:44 +01:00
Erik Johnston
2cc998fed8
Fix replication. And notify
2017-07-20 17:13:18 +01:00
Erik Johnston
139fe30f47
Remember to cast to bool
2017-07-20 16:47:35 +01:00
Erik Johnston
c544188ee3
Add groups to sync stream
2017-07-20 16:36:42 +01:00
Erik Johnston
6f443a74cf
Add update group profile API
2017-07-20 09:46:33 +01:00
Erik Johnston
14a34f12d7
Comments
2017-07-18 17:28:42 +01:00
Erik Johnston
94ecd871a0
Fix typos
2017-07-18 16:38:54 +01:00
Erik Johnston
332839f6ea
Update federation client pokes
2017-07-18 14:45:37 +01:00
Erik Johnston
e5ea6dd021
Add client apis
2017-07-18 14:37:06 +01:00
Erik Johnston
cccfcfa7b9
Comments
2017-07-18 10:35:18 +01:00
Erik Johnston
68f34e85ce
Use transport client directly
2017-07-18 10:29:57 +01:00
Erik Johnston
2f9eafdd36
Add local group server support
2017-07-17 12:03:49 +01:00
Erik Johnston
e9aec001f4
Use less DB for device list handling in sync
2017-07-12 10:30:10 +01:00
Erik Johnston
28e8c46f29
Merge pull request #2352 from matrix-org/erikj/group_server_split
...
Initial Group Server
2017-07-12 10:26:29 +01:00
Erik Johnston
9a6fd3ef29
Don't compute push actions for backfilled events
2017-07-11 10:02:21 +01:00
Erik Johnston
b8ca494ee9
Initial group server implementation
2017-07-10 15:44:15 +01:00
Erik Johnston
5a7f561a9b
Fix bug where pusherpool didn't start and broke some rooms
...
Since we didn't instansiate the PusherPool at start time it could fail
at run time, which it did for some users.
This may or may not fix things for those users, but it should happen at
start time and stop the server from starting.
2017-07-06 17:55:51 +01:00
Mark Haines
3e279411fe
Improve the error handling for bad invites received over federation
2017-06-30 16:20:30 +01:00
Erik Johnston
c72058bcc6
Use an ExpiringCache for storing registration sessions
...
This is because pruning them was a significant performance drain on
matrix.org
2017-06-29 14:08:37 +01:00
Erik Johnston
816605a137
Merge pull request #2307 from matrix-org/erikj/user_ip_batch
...
Batch upsert user ips
2017-06-27 15:08:32 +01:00
Erik Johnston
a0a561ae85
Fix up client ips to read from pending data
2017-06-27 14:46:12 +01:00
Erik Johnston
1bce3e6b35
Remove unused variables
2017-06-26 14:03:27 +01:00
Erik Johnston
e3cbec10c1
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/ensure_round_trip
2017-06-26 14:02:44 +01:00
Erik Johnston
44c722931b
Make some more params configurable
2017-06-22 14:59:52 +01:00
Erik Johnston
2d520a9826
Typo. ARGH.
2017-06-22 14:42:39 +01:00
Erik Johnston
24d894e2e2
Fix thinko in unhandled user spam
2017-06-22 14:39:05 +01:00
Erik Johnston
1217c7da91
Don't work out users who share room with appservice users
2017-06-21 12:00:41 +01:00
Erik Johnston
e5ae386ea4
Handle all cases of sending membership events
2017-06-19 16:07:54 +01:00
Erik Johnston
b490299a3b
Change to create new room and join other users
2017-06-19 14:10:13 +01:00
Erik Johnston
d7fe6b356c
Add shutdown room API
2017-06-19 12:37:27 +01:00
Erik Johnston
fcf01dd88e
Reject local events that don't round trip the DB
2017-06-19 11:33:40 +01:00
Erik Johnston
6aa5bc8635
Initial worker impl
2017-06-16 11:47:11 +01:00
Erik Johnston
a9d6fa8b2b
Include users who share room with requester in user directory
2017-06-15 10:17:21 +01:00
Erik Johnston
4564b05483
Implement updating users who share rooms on the fly
2017-06-15 10:17:17 +01:00
Erik Johnston
72613bc379
Implement initial population of users who share rooms table
2017-06-15 09:59:04 +01:00
Erik Johnston
d9fd937e39
Fix user directory insertion due to missing room_id
2017-06-13 11:50:24 +01:00
Erik Johnston
6ae8373d40
Don't assume existance of events when updating user directory
2017-06-13 10:19:26 +01:00
Erik Johnston
a837765e8c
Merge pull request #2266 from matrix-org/erikj/host_in_room
...
Change is_host_joined to use current_state table
2017-06-12 09:49:51 +01:00
Erik Johnston
1664948e41
Comment
2017-06-09 13:05:05 +01:00
Erik Johnston
0185b75381
Change is_host_joined to use current_state table
...
This bypasses a bug where using the state groups to figure out if a host
is in a room sometimes errors if the servers isn't in the room. (For
example when the server rejected an invite to a remote room)
2017-06-09 10:52:26 +01:00
Erik Johnston
7132e5cdff
Mark remote invite rejections as outliers
2017-06-09 10:08:18 +01:00
Erik Johnston
f45f07ab86
Merge pull request #2258 from matrix-org/erikj/user_dir
...
Don't start user_directory handling on workers
2017-06-07 14:04:50 +01:00
Erik Johnston
a053ff3979
Merge pull request #2248 from matrix-org/erikj/state_fixup
...
Faster cache for get_joined_hosts
2017-06-07 14:01:06 +01:00
Erik Johnston
ecdd2a3658
Don't start user_directory handling on workers
2017-06-07 12:02:53 +01:00
Erik Johnston
2f34ad31ac
Add some logging to user directory
2017-06-07 11:50:44 +01:00
Erik Johnston
09e4bc0501
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/state_fixup
2017-06-07 11:05:23 +01:00
Erik Johnston
1a01af079e
Handle profile updates in user directory
2017-06-01 15:39:51 +01:00
Erik Johnston
21e255a8f1
Split the table in two
2017-06-01 14:50:46 +01:00
Erik Johnston
7233341eac
Comments
2017-06-01 13:11:38 +01:00
Erik Johnston
8be6fd95a3
Check if host is still in room
2017-06-01 13:05:39 +01:00
Erik Johnston
9c7db2491b
Fix removing users
2017-06-01 11:36:50 +01:00
Erik Johnston
0fe6f3c521
Bug fixes and logging
...
- Check if room is public when a user joins before adding to user dir
- Fix typo of field name "content.join_rules" -> "content.join_rule"
2017-06-01 11:09:49 +01:00
Erik Johnston
cc7609aa9f
Comment briefly on how we keep user_directory up to date
2017-05-31 17:11:18 +01:00
Erik Johnston
b2d8d07109
Lifts things into separate function
2017-05-31 17:00:24 +01:00
Erik Johnston
f9791498ae
Typos
2017-05-31 16:50:57 +01:00
Erik Johnston
f091061711
Fix tests
2017-05-31 16:34:40 +01:00
Erik Johnston
dc51af3d03
Pull max id from correct table
2017-05-31 15:13:49 +01:00
Erik Johnston
350622a107
Handle the server leaving a public room
2017-05-31 15:11:36 +01:00
Erik Johnston
63fda37e20
Add comments
2017-05-31 15:00:29 +01:00
Erik Johnston
3b5f22ca40
Add search
2017-05-31 14:00:01 +01:00
Erik Johnston
b5db4ed5f6
Update room column when room becomes unpublic
2017-05-31 13:40:28 +01:00
Erik Johnston
168524543f
Add call later
2017-05-31 11:59:36 +01:00
Erik Johnston
3e123b8497
Start later
2017-05-31 11:56:27 +01:00
Erik Johnston
42137efde7
Don't go round in circles
2017-05-31 11:55:13 +01:00
Erik Johnston
eeb2f9e546
Add user_directory to database
2017-05-31 11:51:01 +01:00
Erik Johnston
23da638360
Fix typing tests
2017-05-26 10:02:04 +01:00
Erik Johnston
11f139a647
Merge pull request #2247 from matrix-org/erikj/auth_event
...
Only store event_auth for state events
2017-05-24 16:46:34 +01:00