Daniel Wagner-Hall
f318d4f2a4
Inline _do_join as it now only has one caller
...
Also, consistently apply rate limiting.
Again, ugly, but a step in the right direction.
2016-02-15 15:57:10 +00:00
Daniel Wagner-Hall
e71095801f
Merge implementation of /join by alias or ID
...
This code is kind of rough (passing the remote servers down a long
chain), but is a step towards improvement.
2016-02-15 15:39:16 +00:00
Daniel Wagner-Hall
dbeed36dec
Merge some room joining codepaths
...
Force joining by alias to go through the send_membership_event checks,
rather than bypassing them straight into _do_join. This is the first of
many stages of cleanup.
2016-02-15 14:38:27 +00:00
Daniel Wagner-Hall
4de08a4672
Revert "Merge two of the room join codepaths"
...
This reverts commit cf81375b94
.
It subtly violates a guest joining auth check
2016-02-12 16:17:24 +00:00
Daniel Wagner-Hall
cf81375b94
Merge two of the room join codepaths
...
There's at least one more to merge in.
Side-effects:
* Stop reporting None as displayname and avatar_url in some cases
* Joining a room by alias populates guest-ness in join event
* Remove unspec'd PUT version of /join/<room_id_or_alias> which has not
been called on matrix.org according to logs
* Stop recording access_token_id on /join/room_id - currently we don't
record it on /join/room_alias; I can try to thread it through at some
point.
2016-02-12 15:11:49 +00:00
Mark Haines
58c9f20692
Catch the exceptions thrown by twisted when you write to a closed connection
2016-02-12 13:46:59 +00:00
Erik Johnston
ec0f3836ff
Merge branch 'master' of github.com:matrix-org/synapse into develop
2016-02-12 11:19:37 +00:00
Erik Johnston
4d54d87c3e
Mitigate against incorrect old state in /sync.
...
There have been reports from the field that servers occasionally have
incorrect notions of what the old state of a room is. This proves
problematic as /sync relies on a correct old state.
This patch makes /sync specifically include in the 'state' key any
current state events that haven't been correctly included.
2016-02-12 11:13:06 +00:00
Daniel Wagner-Hall
dc6da63e30
Enforce user_id exclusivity for AS registrations
...
This whole set of checks is kind of an ugly mess, which I may clean up
at some point, but for now let's be correct.
2016-02-11 17:37:38 +00:00
Daniel Wagner-Hall
763360594d
Mark AS users with their AS's ID
2016-02-11 17:26:42 +00:00
Erik Johnston
2a24f906a9
Bump version and changelog
2016-02-11 16:04:15 +00:00
Erik Johnston
a79af259e9
Merge branch 'master' of github.com:matrix-org/synapse into develop
2016-02-11 16:02:17 +00:00
Erik Johnston
ce14c7a995
Fix SYN-627, events are in incorrect room in /sync
2016-02-11 15:02:56 +00:00
Erik Johnston
1a830b751d
Bump version and changelog
2016-02-11 10:53:42 +00:00
Erik Johnston
0eff740523
Return events in correct order for /events
2016-02-11 10:07:27 +00:00
Erik Johnston
a1b7902944
Add some paranoia logging
2016-02-11 09:22:37 +00:00
Matthew Hodgson
103b432c84
0.13.1
2016-02-10 16:35:17 +00:00
Matthew Hodgson
7634687057
Merge branch 'master' of git+ssh://github.com/matrix-org/synapse
2016-02-10 16:27:15 +00:00
Matthew Hodgson
b3ecb96e36
try to bump syweb to 0.6.8
2016-02-10 16:27:12 +00:00
Erik Johnston
6e89e69d08
Bump version and changelog
2016-02-10 14:36:06 +00:00
Erik Johnston
e66d0bd03a
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.13.0
2016-02-10 14:12:48 +00:00
Erik Johnston
5189bfdef4
Batch fetch _get_state_groups_from_groups
2016-02-10 13:24:42 +00:00
Erik Johnston
24f00a6c33
Use _simple_select_many for _get_state_group_for_events
2016-02-10 12:57:50 +00:00
Erik Johnston
8e49892b21
Only calculate initial sync for 10 rooms at a time
...
This helps to ensure we don't completely starve other requests.
2016-02-10 11:42:07 +00:00
Erik Johnston
e557dc80b8
Merge pull request #566 from matrix-org/erikj/logcontext
...
Don't bother copying records on parent context
2016-02-10 11:41:45 +00:00
Erik Johnston
4eb8f9ca8a
Remove comment
2016-02-10 11:29:21 +00:00
Erik Johnston
f7ef5c1d57
Merge pull request #568 from matrix-org/erikj/unread_notif
...
Atomically persit push actions when we persist the event
2016-02-10 11:25:32 +00:00
Erik Johnston
00c9ad49df
s/parent_context/previous_context/
2016-02-10 11:25:19 +00:00
Erik Johnston
9777c5f49a
Set parent context on instansiation
2016-02-10 11:23:32 +00:00
Erik Johnston
0214745239
Rename functions
2016-02-10 11:09:56 +00:00
Erik Johnston
6ad9586c84
Merge pull request #565 from matrix-org/erikj/macaroon_config
...
Derive macaroon_secret_key from signing key.
2016-02-09 16:34:15 +00:00
Erik Johnston
7b0d846407
Atomically persit push actions when we persist the event
2016-02-09 16:19:15 +00:00
Erik Johnston
f28cc45183
Pass in current state to push action handler
2016-02-09 16:01:40 +00:00
Erik Johnston
78d6c1b5be
Change a log from debug to info
2016-02-09 14:44:12 +00:00
Erik Johnston
feb294d552
Remove dead code
2016-02-09 14:32:17 +00:00
Erik Johnston
70a8608749
Invalidate get_last_receipt_event_id_for_user cache
2016-02-09 14:27:29 +00:00
Erik Johnston
eff12e838c
Don't load all ephemeral state for a room on every sync
2016-02-09 13:55:59 +00:00
Erik Johnston
82631c5f94
Fix unit tests
2016-02-09 13:50:37 +00:00
Erik Johnston
9ac9b75bc4
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2016-02-09 12:58:10 +00:00
Daniel Wagner-Hall
ebaa999f92
Revert "Reject additional path segments"
...
This reverts commit 1d19a5ec0f
.
iOS Console is apparently relying on these paths.
2016-02-09 12:46:52 +00:00
Erik Johnston
6c558ee8bc
Measure some /sync related things
2016-02-09 11:31:42 +00:00
Erik Johnston
31a2b892d8
Revert to putting it around the entire block
2016-02-09 11:25:09 +00:00
Erik Johnston
9daa4e2a85
Don't create new logging context
2016-02-09 11:06:19 +00:00
Erik Johnston
3e2fcd67b2
Don't bother copying records on parent context
2016-02-09 10:50:31 +00:00
Erik Johnston
241b71852e
Fix bug in util.metrics.Measure
2016-02-09 10:28:13 +00:00
Erik Johnston
97294ef2fd
Create new context when measuring
2016-02-09 10:12:00 +00:00
Erik Johnston
549698b1e0
Don't measure across event stream call, as it lasts for a long time.
2016-02-09 09:37:09 +00:00
Erik Johnston
c486b7b41c
Change logcontext warns to debug
2016-02-09 09:20:38 +00:00
Erik Johnston
f078ecbc8f
Derive macaroon_secret_key from signing key.
...
Unfortunately, there are people that are running synapse without a
`macaroon_sercret_key` set. Mandating they set one is a good solution,
except that breaking auto upgrades is annoying.
2016-02-08 16:35:44 +00:00
Erik Johnston
2bb5f035af
Merge pull request #564 from matrix-org/erikj/logcontext
...
Fix up logcontexts
2016-02-08 15:16:16 +00:00
Erik Johnston
cca5c06679
Merge pull request #562 from matrix-org/erikj/push_metric
...
Add metrics to pushers
2016-02-08 14:57:40 +00:00
Erik Johnston
2c1fbea531
Fix up logcontexts
2016-02-08 14:26:45 +00:00
Erik Johnston
13e6262659
Add metrics to pushers
2016-02-08 14:26:45 +00:00
Daniel Wagner-Hall
1d19a5ec0f
Reject additional path segments
2016-02-08 10:50:55 +00:00
Daniel Wagner-Hall
79a1c0574b
Allocate guest user IDs numericcally
...
The current random IDs are ugly and confusing when presented in UIs.
This makes them prettier and easier to read.
Also, disable non-automated registration of numeric IDs so that we don't
need to worry so much about people carving out our automated address
space and us needing to keep retrying ID registration.
2016-02-05 11:22:30 +00:00
Daniel Wagner-Hall
737c4223ef
Host /media/r0 as well as /media/v1
2016-02-05 10:47:46 +00:00
Daniel Wagner-Hall
6a9f1209df
Error if macaroon key is missing from config
...
Currently we store all access tokens in the DB, and fall back to that
check if we can't validate the macaroon, so our fallback works here, but
for guests, their macaroons don't get persisted, so we don't get to
find them in the database. Each restart, we generate a new ephemeral
key, so guests lose access after each server restart.
I tried to fix up the config stuff to be less insane, but gave up, so
instead I bolt on yet another piece of custom one-off insanity.
Also, add some basic tests for config generation and loading.
2016-02-05 01:58:23 +00:00
David Baker
34dda7cc7f
Merge pull request #557 from matrix-org/dbkr/profile_dont_return_null
...
Omit keys rather then returning null in profile API
2016-02-04 15:39:12 +00:00
Erik Johnston
4d36e73230
Actually return something sensible
2016-02-03 16:35:00 +00:00
Erik Johnston
709e09e1c3
Remove old log line
2016-02-03 16:32:20 +00:00
Erik Johnston
aa4af94c69
We return dicts now.
2016-02-03 16:29:32 +00:00
Erik Johnston
b84d59c5f0
Add descriptions
2016-02-03 16:22:35 +00:00
Erik Johnston
33c71c3a4b
Preserve log context over when deferring to thread pool in media repo
2016-02-03 16:17:18 +00:00
Erik Johnston
c8e4d5de7f
Merge pull request #555 from matrix-org/erikj/logcontext
...
Allowing tagging log contexts
2016-02-03 15:20:00 +00:00
David Baker
156cea5b45
No braces here
2016-02-03 15:04:51 +00:00
Erik Johnston
8450114098
Merge pull request #554 from matrix-org/erikj/event_push
...
Change event_push_actions_rm_tokens schema
2016-02-03 15:02:47 +00:00
David Baker
24277fbb97
Don't return null if profile display name / avatar url isn't set: omit them instead
2016-02-03 14:59:19 +00:00
Daniel Wagner-Hall
66bb255fcd
Merge pull request #556 from matrix-org/daniel/config
...
Rename config field to reflect yaml name
2016-02-03 14:55:54 +00:00
Daniel Wagner-Hall
5054806ec1
Rename config field to reflect yaml name
2016-02-03 14:42:01 +00:00
Erik Johnston
d4f72a5bfb
Allowing tagging log contexts
2016-02-03 13:52:27 +00:00
Erik Johnston
f8aae79a72
Simplify get_rooms
2016-02-03 13:24:35 +00:00
Erik Johnston
9cd80a7b5c
PEP8
2016-02-03 11:52:57 +00:00
Erik Johnston
772b45c745
Remove unused method
2016-02-03 11:43:26 +00:00
Erik Johnston
6f52e90065
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/public_room_fix
2016-02-03 11:06:29 +00:00
Erik Johnston
771528ab13
Change event_push_actions_rm_tokens schema
2016-02-03 10:50:49 +00:00
Erik Johnston
b32121a5d1
Unused import
2016-02-03 10:30:56 +00:00
Daniel Wagner-Hall
2df6114bc4
Log more diagnostics for unrecognised access tokens
2016-02-02 19:21:49 +00:00
Daniel Wagner-Hall
d83d004ccd
Fix flake8 warnings for new flake8
2016-02-02 17:18:50 +00:00
Erik Johnston
8a391e33ae
s/get_room_changes_for_user/get_membership_changes_for_user/
2016-02-02 16:12:10 +00:00
Erik Johnston
477b1ed6cf
Fetch events in a separate transaction.
...
This has a couple of benefits:
- It reduces the time of transactions, allowing other database requests
to run.
- Fetching events is given a dedicated database thread, and so can't
starve other database requests.
2016-02-02 15:58:14 +00:00
Erik Johnston
04ad93e6fd
Merge pull request #545 from matrix-org/erikj/sync
...
Move /sync state calculations from rest to handler
2016-02-02 15:28:43 +00:00
Erik Johnston
65e92eca49
Change the way we do public room list fetching
2016-02-02 15:21:10 +00:00
David Baker
69214ea671
Pass make_guest whne we autogen a user ID
2016-02-02 14:42:31 +00:00
Erik Johnston
b023995538
WARN if we get a topo token instead of stream.
2016-02-02 14:11:14 +00:00
David Baker
793369791a
Merge pull request #547 from matrix-org/dbkr/fix_guest_upgrade
...
Pull guest access token out of the auth session params
2016-02-02 09:47:30 +00:00
Erik Johnston
854ca32f10
Comments
2016-02-01 16:52:27 +00:00
David Baker
d7ac861d3b
Pull guest access token out of the auth session params, otherwise it will break if you open the email on a different device.
2016-02-01 16:33:19 +00:00
Erik Johnston
89b40b225c
Order things correctly
2016-02-01 16:32:46 +00:00
Erik Johnston
4bf448be25
Switch over /events to use per room caches
2016-02-01 16:26:51 +00:00
Erik Johnston
fa48020a52
Move state calculations from rest to handler
2016-02-01 15:59:40 +00:00
Erik Johnston
2d3837bec7
Merge pull request #543 from matrix-org/erikj/sync
...
Cache get_room_changes_for_user
2016-02-01 15:05:06 +00:00
Erik Johnston
ceb6b8680a
Only use room_ids if in get_room_events_stream if is_guest
2016-02-01 10:33:52 +00:00
Erik Johnston
d98a9f2583
Don't use before_token. Its wrong. Use actual limit.
2016-01-31 13:31:15 +00:00
Erik Johnston
25c311eaf6
Cache get_room_changes_for_user
2016-01-29 16:52:48 +00:00
Erik Johnston
cc9c97e0dc
Invalidate _account_data_stream_cache correctly
2016-01-29 16:41:51 +00:00
Erik Johnston
e70165039c
If stream pos is greater then earliest known key and entity hasn't changed, then entity hasn't changed
2016-01-29 16:41:32 +00:00
Erik Johnston
c1de91aca4
Merge pull request #540 from matrix-org/erikj/sync
...
Prefill stream change caches
2016-01-29 15:52:42 +00:00
Erik Johnston
b55b90bfb4
Merge pull request #541 from matrix-org/erikj/fixsomeofpush
...
Make /events always return a newer token, if one exists
2016-01-29 15:45:35 +00:00
Erik Johnston
8da95b6f1b
Comment. Remove superfluous order by
2016-01-29 15:39:17 +00:00
Erik Johnston
13724569ec
Deal with None limit
2016-01-29 15:33:44 +00:00
Erik Johnston
4a6eb5eb45
Make /events always return a newer token, if one exists
2016-01-29 15:22:17 +00:00
Mark Haines
6927d0e091
Add missing param to the log line
2016-01-29 15:01:26 +00:00
Erik Johnston
b5dbced938
Don't prefill account data
2016-01-29 14:53:59 +00:00
Erik Johnston
3d60686c0c
Actually use cache
2016-01-29 14:49:11 +00:00
Erik Johnston
45488e0ffa
Max is not a function
2016-01-29 14:42:01 +00:00
Erik Johnston
f67d60496a
Convert param style
2016-01-29 14:41:16 +00:00
Erik Johnston
18579534ea
Prefill stream change caches
2016-01-29 14:37:59 +00:00
Mark Haines
47374a33fc
Merge remote-tracking branch 'origin/develop' into markjh/3pid
2016-01-29 14:15:12 +00:00
Mark Haines
0fcafbece8
Add config option for setting the trusted id servers, disabling checking the ID server in integration tests
2016-01-29 14:12:26 +00:00
Erik Johnston
fd142c29d9
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.12.1
2016-01-29 13:52:12 +00:00
Erik Johnston
ebc5f00efe
Bump AccountDataAndTagsChangeCache size
2016-01-29 13:37:40 +00:00
Erik Johnston
ea320d3464
Don't work out unread_notifs_for_room_id unless needed
2016-01-29 13:34:48 +00:00
Mark Haines
5687a00e4e
Allow three_pid_creds as well as threePidCreds in /account/3pid
2016-01-29 13:26:15 +00:00
Erik Johnston
b18114e19e
Merge pull request #536 from matrix-org/erikj/sync
...
Make /sync "better".
2016-01-29 13:04:51 +00:00
Erik Johnston
02a9c3be6c
Merge pull request #538 from matrix-org/erikj/fix_lru_cache
...
Fix LruCache. Make TreeCache track its own size.
2016-01-29 11:53:55 +00:00
Erik Johnston
fb7299800f
Directly set self.value
2016-01-29 11:29:14 +00:00
Erik Johnston
c046630c33
Remove spurious self.size
2016-01-29 11:17:54 +00:00
Erik Johnston
a30364c1f9
Correctly bookkeep the size of TreeCache
2016-01-29 10:44:46 +00:00
Erik Johnston
766526e114
Make TreeCache keep track of its own size.
2016-01-29 10:11:21 +00:00
Erik Johnston
50e18938a9
Reset size on clear
2016-01-29 10:00:45 +00:00
Erik Johnston
467c27a1f9
Amalgamate tags and account data stream caches
2016-01-28 18:20:00 +00:00
Erik Johnston
3f5dd18bd4
If the same as the earliest key, assume nothing has changed.
2016-01-28 18:11:41 +00:00
Erik Johnston
40431251cb
Correctly update _entity_to_key
2016-01-28 18:05:43 +00:00
Erik Johnston
82cf3a8043
Fix inequalities
2016-01-28 17:44:04 +00:00
Erik Johnston
03b2c2577c
Don't use defer.returnValue
2016-01-28 17:29:24 +00:00
Erik Johnston
0663c5bd52
Include cache hits with has_entity_changed
2016-01-28 17:27:28 +00:00
Erik Johnston
35981c8b71
Fix test
2016-01-28 17:20:05 +00:00
Erik Johnston
8fe8951a8d
Cache filters
2016-01-28 17:09:09 +00:00
Erik Johnston
fdca8ec418
Add events index
2016-01-28 16:41:59 +00:00
Erik Johnston
45cf827c8f
Change name and doc has_entity_changed
2016-01-28 16:39:18 +00:00
Erik Johnston
00cb3eb24b
Cache tags and account data
2016-01-28 16:37:41 +00:00
Erik Johnston
c23a8c7833
Ensure keys to RoomStreamChangeCache are ints
2016-01-28 15:55:26 +00:00
Erik Johnston
e1941442d4
Invalidate caches properly. Remove unused arg
2016-01-28 15:02:41 +00:00
Daniel Wagner-Hall
0935802f1e
Pin pynacl to 0.3.0
...
Something has gone wrong in the packaging of 1.* which causes it not to
compile.
2016-01-28 14:47:03 +00:00
Erik Johnston
19fd425928
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sync
2016-01-28 14:46:08 +00:00
Erik Johnston
167d1df699
Merge pull request #534 from matrix-org/erikj/setup
...
Add a Homeserver.setup method
2016-01-28 14:45:36 +00:00
Erik Johnston
7ed2bbeb11
Clean up a bit. Add comment
2016-01-28 14:32:05 +00:00
Erik Johnston
571a566399
Change load limit params
2016-01-28 14:11:16 +00:00
Erik Johnston
3c6518ddbf
Amalgamate incremental and full sync for user
2016-01-28 14:03:48 +00:00
Erik Johnston
4e7948b47a
Allow paginating backwards from stream token
2016-01-28 11:52:34 +00:00
Erik Johnston
ba8931829b
Return correct type of token
2016-01-28 11:34:17 +00:00
Erik Johnston
61eaa6ec64
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sync
2016-01-28 10:50:57 +00:00
Erik Johnston
c5e7c0e436
Up get_rooms_for_user cache size
2016-01-28 09:58:45 +00:00
Richard van der Hoff
e26390ca46
Merge pull request #535 from matrix-org/rav/paginate_from_stream_token
...
Make it possible to paginate forwards from stream tokens
2016-01-28 09:49:46 +00:00
Erik Johnston
a6477d5933
Remove chdir
2016-01-28 09:19:55 +00:00
Richard van der Hoff
5cba88ea7c
Make it possible to paginate forwards from stream tokens
...
In order that we can fill the gap after a /sync, make it possible to paginate
forwards from a stream token.
2016-01-27 17:42:45 +00:00
Erik Johnston
5fc9b17518
No chdir
2016-01-27 17:39:20 +00:00
Erik Johnston
fa90c180ee
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/setup
2016-01-27 17:37:33 +00:00
Erik Johnston
5610880003
Merge pull request #530 from matrix-org/erikj/server_refactor
...
Remove redundant BaseHomeServer
2016-01-27 17:36:31 +00:00
Erik Johnston
e7febf4fbb
PEP8
2016-01-27 17:33:27 +00:00
Erik Johnston
aca3193efb
Use the same path for incremental with gap or without gap
2016-01-27 17:33:27 +00:00
Erik Johnston
b97f6626b6
Add cache to room stream
2016-01-27 17:33:26 +00:00
Erik Johnston
f93ecf8783
Don't turn on profiling
2016-01-27 17:33:26 +00:00
Erik Johnston
a955cbfa49
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/setup
2016-01-27 17:22:35 +00:00
Richard van der Hoff
8c97b49886
Merge pull request #533 from matrix-org/rav/hashtest_federation
...
Fix federation for #test:matrix.org
2016-01-27 17:19:36 +00:00
Erik Johnston
2152b320c5
PEP 8
2016-01-27 17:09:17 +00:00
Richard van der Hoff
d6d60b4d6c
Federation: drop events which cause SynapseErrors
...
... rather than rejecting any attempt to federate channels which contain such
events.
2016-01-27 17:02:10 +00:00
Mark Haines
d6c831bd3d
Merge pull request #531 from matrix-org/markjh/relative_push_rules
...
Fix adding push rules relative to other rules
2016-01-27 17:13:36 +01:00
Erik Johnston
03f4569dc3
Bump version and changelog
2016-01-27 10:35:30 +00:00
Mark Haines
8c94833b72
Fix adding push rules relative to other rules
2016-01-27 10:24:20 +00:00
Erik Johnston
9fda8b5193
Don't turn on profiling
2016-01-26 18:27:23 +00:00
Erik Johnston
e4e33c743e
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/server_refactor
2016-01-26 17:30:00 +00:00
Erik Johnston
87f9477b10
Add a Homeserver.setup method.
...
This is for setting up dependencies that require work on startup. This
is useful for the DataStore that wants to read a bunch from the database
before initiliazing.
2016-01-26 15:51:06 +00:00
Erik Johnston
9959d9ece8
Remove redundated BaseHomeServer
2016-01-26 13:52:29 +00:00
David Baker
766c24b2e6
Only notify for messages in one to one rooms, not every event
...
Fixes the fact that candidate events and hangups generated notifications.
2016-01-26 10:21:41 +00:00
Mark Haines
7179fdd550
Merge pull request #528 from matrix-org/markjh/missing_yield
...
Add missing yield in push_rules set enabled
2016-01-25 21:26:30 +01:00
Erik Johnston
c887c4cbd5
Merge pull request #524 from matrix-org/erikj/sync
...
Move some sync logic from rest to handlers pacakege
2016-01-25 16:58:39 +00:00
Mark Haines
e18257f0e5
Add missing yield in push_rules set enabled
2016-01-25 16:51:56 +00:00
Erik Johnston
8431f62ebb
Merge pull request #525 from matrix-org/erikj/select_many
...
Implement a `_simple_select_many_batch`
2016-01-25 16:30:36 +00:00
Erik Johnston
f091b73e69
Merge pull request #527 from matrix-org/erikj/push_cache
...
Push: Use storage apis that are cached
2016-01-25 16:16:34 +00:00
Erik Johnston
ce6fbbea94
Merge pull request #526 from matrix-org/erikj/push_index
...
Add index to event_push_actions
2016-01-25 16:06:07 +00:00
Erik Johnston
aea5da0ef6
Guard against empty iterables
2016-01-25 15:59:29 +00:00
Erik Johnston
3a75159832
Merge pull request #521 from matrix-org/erikj/underscores
...
Underscores are allowed in user ids
2016-01-25 15:56:31 +00:00
Erik Johnston
1ebf5e3d03
Correct docstring
2016-01-25 15:53:36 +00:00
Erik Johnston
dc2647cd3d
PEP8
2016-01-25 15:48:54 +00:00
Erik Johnston
86896408b0
Add index to event_push_actions
2016-01-25 15:30:32 +00:00
Erik Johnston
53cb173663
Push: Use storage apis that are cached
2016-01-25 13:55:18 +00:00
Erik Johnston
d59c58bc95
Remove weird stuff
2016-01-25 13:38:53 +00:00
Erik Johnston
ddd25def01
Implement a _simple_select_many_batch
2016-01-25 13:36:02 +00:00
Erik Johnston
8c6012a4af
Fix tests
2016-01-25 13:12:35 +00:00
Erik Johnston
42deca50c2
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sync
2016-01-25 12:49:45 +00:00
Erik Johnston
d685ae73b4
Merge branch 'erikj/filters' of github.com:matrix-org/synapse into develop
2016-01-25 12:35:25 +00:00
Erik Johnston
4021f95261
Move logic from rest/ to handlers/
2016-01-25 10:10:44 +00:00
David Baker
f92fe15897
Merge pull request #523 from matrix-org/dbkr/no_push_unless_notify
...
Better fix for actions with both dont_notify and tweaks
2016-01-22 17:27:25 +00:00
David Baker
3fe8c56736
Better fix for actions with both dont_notify and tweaks
2016-01-22 17:21:58 +00:00
David Baker
60965bd7e5
Revert b4a41aa542
as it's just broken.
2016-01-22 17:21:15 +00:00
David Baker
0e0e441b33
Merge pull request #522 from matrix-org/dbkr/no_push_unless_notify
...
Don't add notifications to the table unless there's actually a 'notify' action
2016-01-22 17:06:52 +00:00
David Baker
b4a41aa542
Don't add notifications to the table unless there's actually a 'notify' action
2016-01-22 16:56:48 +00:00
Erik Johnston
db6e26bb8c
Don't mutate cached values
2016-01-22 16:03:55 +00:00
Erik Johnston
88baa3865e
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/sync
2016-01-22 15:57:12 +00:00
David Baker
7065b75bfd
Don't crash if a user has no push rule enabled entries
2016-01-22 15:13:44 +00:00
Erik Johnston
7959e8b764
Underscores are allowed in user ids
2016-01-22 14:59:49 +00:00
David Baker
52bdd1b834
Overlay the push_rules_enabled map for users, otherwise they won't be able to disable server default rules.
2016-01-22 14:58:19 +00:00
David Baker
7cd418d38e
Don't add the member functiopn if we're not using treecache
2016-01-22 13:40:37 +00:00
David Baker
cd80019eec
docs
2016-01-22 12:21:13 +00:00
David Baker
d552861346
Revert all the bits changing keys of eeverything that used LRUCaches to tuples
2016-01-22 12:18:14 +00:00
David Baker
10f76dc5da
Make LRU cache not default to treecache & add options to use it
2016-01-22 12:10:33 +00:00
David Baker
5b142788d2
Add __contains__
2016-01-22 11:49:59 +00:00
David Baker
eaa836e8ca
Docs for treecache
2016-01-22 11:47:22 +00:00
David Baker
42eae4634f
Use new invalidate_many cache invalidation to invalidate the event_push_actions cache appropriately.
2016-01-22 11:22:48 +00:00
David Baker
8acc5cb60f
Add invalidate_many here too
2016-01-22 11:22:32 +00:00
Erik Johnston
975903ae17
Sanitize filters
2016-01-22 10:41:30 +00:00
David Baker
330be18ec5
peppate
2016-01-21 19:17:32 +00:00
David Baker
f1f8122120
Change LRUCache to be tree-based so we can delete subtrees.
2016-01-21 19:16:25 +00:00
Erik Johnston
0e07f2e15d
Only fetch events for rooms and receipts
2016-01-21 16:10:37 +00:00
Erik Johnston
8f66fe6392
Cache get_unread_event_push_actions_by_room_for_user
2016-01-21 15:02:07 +00:00
Erik Johnston
3a00f13436
Only compute badge count when necessary.
...
This reverts commit d726597737
.
2016-01-21 14:56:11 +00:00
Erik Johnston
c6549117a2
Fix AttributeError
2016-01-21 14:02:14 +00:00
Erik Johnston
ed1d189e10
Merge pull request #515 from matrix-org/erikj/syn-606
...
SYN-606: Peeking does not wake up /events
2016-01-21 13:40:20 +00:00
Erik Johnston
dfe1273d14
Merge pull request #509 from matrix-org/erikj/dns_cache
...
Cache dns lookups, and use the cache if we fail to lookup servers later
2016-01-21 13:37:23 +00:00
Erik Johnston
91a222c66d
SYN-606: Peeking does not wake up /events
...
If a real user attempted to first peek into one room, and then another,
their room event stream would not be woken up for events in the later
room.
2016-01-21 13:22:26 +00:00
David Baker
930ba003f8
Remove member event rule as per SYN-607
2016-01-21 11:50:27 +00:00
David Baker
c1a3021771
Merge pull request #507 from matrix-org/push_badge_counts
...
Push badge counts
2016-01-21 10:09:11 +00:00
Erik Johnston
d049e81b10
Merge pull request #513 from matrix-org/erikj/register_user_chars
...
Don't explode when given a unicode username in /register/
2016-01-21 09:53:35 +00:00
Erik Johnston
c43b6dcc75
Fix change_password
2016-01-20 16:14:48 +00:00
David Baker
367cfab4e6
peppate
2016-01-20 16:05:09 +00:00
Erik Johnston
73ca8e5834
Whine if we give a from param to /sync
2016-01-20 15:42:57 +00:00
Erik Johnston
b088291f14
Don't explode when given a unicode username in /register/
2016-01-20 15:40:25 +00:00
Daniel Wagner-Hall
da417aa56d
Allow non-guests to peek on rooms using /events
2016-01-20 15:34:07 +00:00
David Baker
d4315bbf6b
Add index by user id on receipts_linearized
2016-01-20 15:33:27 +00:00
David Baker
3fa344c037
Add storage function to get all receipts for a user. Also add some cache invalidation to the receipts storage because there wasn't any, and remove a method that was unused.
2016-01-20 15:30:31 +00:00
David Baker
7cc047455e
Inline membership specifier
2016-01-20 13:50:28 +00:00
David Baker
d726597737
Simplify badge updating code by just updating it every time we get woken up and it's not an event
2016-01-20 13:49:00 +00:00
David Baker
2309450a76
Merge branch 'develop' into push_badge_counts
2016-01-20 13:45:13 +00:00
David Baker
746f6e0eb3
'filtered' is a list of zero or 1
2016-01-20 13:44:04 +00:00
David Baker
7441d8cc0c
Merge remote-tracking branch 'origin/develop' into push_badge_counts
2016-01-20 13:40:22 +00:00
David Baker
ccf9387d57
Merge branch 'develop' into push_badge_counts
2016-01-20 13:33:45 +00:00
David Baker
259d1ecd1d
Don't generate push actions for our own events
2016-01-20 13:24:59 +00:00
Erik Johnston
191070123d
Cache dns lookups, and use the cache if we fail to lookup servers later
2016-01-20 11:34:09 +00:00
David Baker
afb7b377f2
Merge branch 'develop' into push_badge_counts
2016-01-19 18:17:23 +00:00
Erik Johnston
af30140621
Merge pull request #506 from matrix-org/erikj/push_fast
...
Only compute unread notifications for rooms we send down stream
2016-01-19 17:31:10 +00:00
Erik Johnston
ac2842ff1e
Only compute unread notifications for rooms we send down stream
2016-01-19 17:19:53 +00:00
Erik Johnston
892ee473d9
Don't use form of get_state_for_events with None state_key
2016-01-19 17:14:46 +00:00
Erik Johnston
2818a000aa
Use split rather than endswith
2016-01-19 16:11:39 +00:00
Erik Johnston
fb5d8e58ff
Change regex cache size to 5000
2016-01-19 16:07:07 +00:00
Erik Johnston
5a7d1ecffc
Add regex cache. Only caculate push actions for users that have sent read receipts, and are on that server
2016-01-19 16:01:05 +00:00
Erik Johnston
d056a0a3d8
Handle glob -> regex errors
2016-01-19 14:43:24 +00:00
Erik Johnston
7a079adc8f
Merge pull request #477 from matrix-org/erikj/access_token_log
...
Don't log urlencoded access_tokens
2016-01-19 14:28:29 +00:00
Erik Johnston
b8518ffe65
Use all_ephemeral_by_room in incremental_sync_with_gap_for_room
2016-01-19 14:26:58 +00:00
Erik Johnston
9654ee0848
Return don't break
2016-01-19 14:24:59 +00:00
Erik Johnston
7ecd211163
Except truthy values
2016-01-19 14:22:02 +00:00
Erik Johnston
05f78b3b52
Merge pull request #504 from matrix-org/erikj/highlight_count
...
Return highlight_count in /sync
2016-01-19 13:21:48 +00:00
Erik Johnston
9a8949f022
Merge branch 'develop' of github.com:matrix-org/synapse into default_notify
2016-01-19 11:37:05 +00:00
Erik Johnston
3adcc4c86a
Return highlight_count in /sync
2016-01-19 11:35:50 +00:00
Erik Johnston
47e7963e50
Merge pull request #502 from matrix-org/erikj/push_notif_perf
...
Unread notification performance.
2016-01-19 11:27:27 +00:00
Erik Johnston
0d241e1114
Take a deepcopy of push rules before mutating them
2016-01-19 10:15:12 +00:00
Erik Johnston
f750a442f7
Update _id
2016-01-19 10:14:53 +00:00
Erik Johnston
003853e702
Preserve truthiness
2016-01-18 17:34:02 +00:00
Erik Johnston
a284ad4092
You need to escape backslashes
2016-01-18 17:20:44 +00:00
Erik Johnston
47f82e4408
Fix branch didn't check word_boundary
2016-01-18 17:04:36 +00:00