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
Matthew Hodgson
7dd0c1730a
initial WIP of a tentative preview_url endpoint - incomplete, untested, experimental, etc. just putting it here for safekeeping for now
2016-01-24 18:47:27 -05: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
Erik Johnston
5cd2126a6a
Remove dead code
2016-01-18 16:49:46 +00:00
Erik Johnston
29c353c553
Don't split at word boundaries, actually use regex
2016-01-18 16:48:17 +00:00
Daniel Wagner-Hall
808a8aedab
Don't error on AS non-ghost user use
...
This will probably go away either when we fix our existing ASes, or when
we kill the concept of non-ghost users.
2016-01-18 16:33:05 +00:00
Daniel Wagner-Hall
74474a6d63
Pull out app service user lookup
...
I find this a lot simpler than nested try-catches and stuff
2016-01-18 16:32:33 +00:00
Erik Johnston
d16dcf642e
Drop log levels
2016-01-18 15:44:04 +00:00
Erik Johnston
7dd14e5d1c
Add comments and remove dead code
2016-01-18 15:42:23 +00:00
Erik Johnston
866fe27e78
Do for loop once at start
2016-01-18 15:29:41 +00:00
Erik Johnston
d1f56f732e
Use static for const dicts
2016-01-18 15:17:56 +00:00
Erik Johnston
0e39dcd135
Remove internal ids
2016-01-18 14:50:17 +00:00
Erik Johnston
345ff2196a
Don't edit ruleset
2016-01-18 14:50:17 +00:00
Erik Johnston
2c176e02ae
Make unit tests work
2016-01-18 14:48:50 +00:00
Erik Johnston
63485b3029
Re-enable urnead notifications
2016-01-18 14:48:30 +00:00
Erik Johnston
f59b564507
Make notifications go quicker
2016-01-18 14:48:29 +00:00
Erik Johnston
2068678b8c
Make Event objects behave more like dicts
2016-01-18 14:43:50 +00:00
Erik Johnston
cc66a9a5e3
Allow filtering events for multiple users at once
2016-01-18 14:43:50 +00:00
Daniel Wagner-Hall
ac5a4477ad
Require unbanning before other membership changes
2016-01-15 16:27:26 +00:00
Daniel Wagner-Hall
b5ce4f0427
Remove unused parameters
2016-01-15 13:54:03 +00:00
David Baker
5819b7a78c
M_INVALID_USERNAME to be consistent with the parameter name
2016-01-15 10:06:34 +00:00
David Baker
3f8db3d597
Add specific error code for invalid user names.
2016-01-14 17:21:04 +00:00
Erik Johnston
a50013fd99
Merge pull request #497 from matrix-org/erikj/max_limit
...
Clamp pagination limits to at most 1000
2016-01-14 16:28:52 +00:00
Richard van der Hoff
2978053d16
Merge branch 'release-v0.12.1' into develop
2016-01-14 15:04:08 +00:00
Daniel Wagner-Hall
2680043bc6
Require ID and as_token be unique for ASs
...
Defaults ID to as_token if not specified. This will change
when IDs are fully supported.
2016-01-14 14:34:01 +00:00
David Baker
8db451f652
Merge pull request #498 from matrix-org/push_rule_enabled_fix
...
Fix enabling & disabling push rules
2016-01-14 13:34:05 +00:00
Daniel Wagner-Hall
d14fcfd24a
Merge pull request #487 from matrix-org/daniel/forceregistration
...
Require AS users to be registered before use
2016-01-14 11:06:43 +00:00
Daniel Wagner-Hall
27927463a1
Merge pull request #494 from matrix-org/daniel/2
...
Don't start server if ASes are invalidly configured
2016-01-14 11:06:19 +00:00
Daniel Wagner-Hall
fcb6df45e5
Merge pull request #493 from matrix-org/daniel/1
...
Delete unused code
2016-01-14 11:06:14 +00:00
David Baker
a7927c13fd
Fix enabling & disabling push rules
2016-01-14 10:53:44 +00:00
Erik Johnston
339c8f0133
Clamp pagination limits to at most 1000
2016-01-14 10:22:02 +00:00
Erik Johnston
bce602eb4e
Use logger not logging
2016-01-14 09:56:26 +00:00
David Baker
12623c99b6
Use the unread notification count to send accurate badge counts in push notifications.
2016-01-13 18:55:57 +00:00
Erik Johnston
2655d61d70
Don't change signature. Return empty list
2016-01-13 17:43:39 +00:00
Erik Johnston
fcb05b4c82
Temporarily disable notification branch
2016-01-13 17:39:58 +00:00
Daniel Wagner-Hall
f6fcff3602
Don't start server if ASes are invalidly configured
2016-01-13 17:09:24 +00:00
Daniel Wagner-Hall
244b356a37
Delete unused code
2016-01-13 17:03:58 +00:00
Richard van der Hoff
49f33f6438
Add 'event' result to 'context' endpoint
...
... because the context isn't much use without the event.
2016-01-13 16:42:14 +00:00
Daniel Wagner-Hall
93afb40cd4
Skip, rather than erroring, invalid guest requests
...
Erroring causes problems when people make illegal requests, because they
don't know what limit parameter they should pass.
This is definitely buggy. It leaks message counts for rooms people don't
have permission to see, via tokens. But apparently we already
consciously decided to allow that as a team, so this preserves that
behaviour.
2016-01-13 16:41:42 +00:00
Mark Haines
9c1f853d58
Rename 'user_name' to 'user_id' in push to make it consistent with the rest of the code
2016-01-13 13:32:59 +00:00
Daniel Wagner-Hall
7d09ab8915
Require AS users to be registered before use
2016-01-13 13:19:47 +00:00
David Baker
d9db819e23
Change default pushrules back to notifying for all messages.
2016-01-13 13:15:53 +00:00
Erik Johnston
44b4fc5f50
Use compiled regex
2016-01-13 11:47:32 +00:00
Mark Haines
f4dad9f639
Merge remote-tracking branch 'origin/erikj/bulk_get_push_rules' into markjh/table_name
...
Conflicts:
synapse/storage/push_rule.py
2016-01-13 11:46:07 +00:00
Erik Johnston
8740e4e94a
bulk_get_push_rules should handle empty lists
2016-01-13 11:37:17 +00:00
Mark Haines
c0a279e808
Delete the table objects from TransactionStore
2016-01-13 11:15:20 +00:00
Mark Haines
96e400fee5
Remove the RoomsTable object
2016-01-13 11:07:32 +00:00
Erik Johnston
72ba26679b
Merge pull request #480 from matrix-org/erikj/guest_event_tightloop
...
Dont fire user_joined_room when guest hits /events
2016-01-13 11:00:50 +00:00
Erik Johnston
70dfe4dc96
Don't include old left rooms
2016-01-12 15:01:56 +00:00
Mark Haines
a8e9e0b916
Remove the PushersTable and EventPushActionsTable objects
2016-01-12 14:41:26 +00:00
Mark Haines
31de2953a3
Remove the PushRuleTable and PushRuleEnableTable objects
2016-01-12 14:36:16 +00:00
Erik Johnston
fd5c28dc52
Dont fire user_joined_room when guest hits /events
...
Firing the 'user_joined_room' signal everytime a guest hits /events
causes all presence for that room to be returned in the stream. This may
sound helpful, but causes clients to tightloop calling /events.
In general, guest users should get the initial presence from (room)
intial sync and so we don't require presence to sbsequently come down
the event stream.
2016-01-12 11:04:06 +00:00
Daniel Wagner-Hall
42aa1f3f33
Merge pull request #478 from matrix-org/daniel/userobject
...
Introduce a User object
I'm sick of passing around more and more things as tuple items around
the whole world, and needing to edit every call site every time there is
more information about a user. So pass them around together as an
object.
This object has incredibly poorly named fields because we have a
convention that `user` indicates a UserID object, and `user_id`
indicates a string. I tried to clean up the whole repo to fix this, but
gave up. So instead, I introduce a second convention. A user_object is a
User, and a user_id_object is a UserId. I may have cried a little bit.
2016-01-11 17:50:22 +00:00
Daniel Wagner-Hall
2110e35fd6
Introduce a Requester object
...
This tracks data about the entity which made the request. This is
instead of passing around a tuple, which requires call-site
modifications every time a new piece of optional context is passed
around.
I tried to introduce a User object. I gave up.
2016-01-11 17:48:45 +00:00
David Baker
b5d33a656f
Postgres doesn't like booleans
2016-01-11 17:13:52 +00:00
David Baker
fe56138142
Remove rogue 'admin'
2016-01-11 17:09:03 +00:00
Erik Johnston
8f8b884430
Don't log urlencoded access_tokens
2016-01-08 17:48:08 +00:00
Erik Johnston
29e595e5d4
Merge pull request #474 from matrix-org/erikj/core_dump
...
Turn on core dumps
2016-01-08 16:52:15 +00:00
David Baker
c232780081
Merge pull request #456 from matrix-org/store_event_actions
...
Send unread notification counts
2016-01-08 14:47:15 +00:00
Mark Haines
8677b7d698
Only use cropped thumbnails when asked for a cropped thumbnail.
...
Even though ones cropped with scale might be technically valid.
2016-01-07 18:57:15 +00:00
Erik Johnston
33bef689c1
Turn on core dumps
2016-01-07 15:34:30 +00:00
Erik Johnston
fcbe63eaad
Use logger not logging
2016-01-07 15:28:17 +00:00
Erik Johnston
5727922106
Merge pull request #473 from matrix-org/erikj/ssh_manhole
...
Change manhole to use ssh
2016-01-07 14:36:16 +00:00
Erik Johnston
5dc5e29b9c
s/telnet/ssh/
2016-01-07 14:02:57 +00:00
Erik Johnston
c9ae1d1ee5
Change manhole to use ssh
2016-01-07 13:59:02 +00:00
David Baker
daadcf36c0
This comma is actually important
2016-01-07 10:15:35 +00:00
David Baker
823b679232
more commas
2016-01-07 10:02:47 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Matthew Hodgson
49c34dfd36
Merge pull request #472 from roblabla/patch-1
...
Config Comment mixup in captcha public/private key
2016-01-06 22:24:28 +00:00
Robin Lambertz
4106477e7f
Config Comment mixup in captcha public/private key
2016-01-06 23:19:33 +01:00
Daniel Wagner-Hall
11a974da21
Add /_matrix/versions to report supported versions
2016-01-06 18:08:52 +00:00
David Baker
09dc9854cd
comma style
2016-01-06 17:44:10 +00:00
David Baker
442fcc02f7
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-06 17:28:55 +00:00
David Baker
b6a585348a
Adding is_guest here won't work because it just constructs a dict of uid -> password hash
2016-01-06 17:16:02 +00:00
Mark Haines
4cec90a260
Pass whether the user was a guest to some of the event streams
2016-01-06 16:54:57 +00:00
Mark Haines
392773ccb2
Guest users must be joined to a room to see it in /sync
2016-01-06 16:44:13 +00:00
Daniel Wagner-Hall
bf32922e5a
Log when starting stats reporting
2016-01-06 14:13:34 +00:00
Daniel Wagner-Hall
797691f908
Log on stats scheduling
2016-01-06 14:04:27 +00:00
Daniel Wagner-Hall
5880de186b
Log when we skip daily messages
2016-01-06 13:52:16 +00:00
David Baker
992928304f
Delete notifications for redacted events
2016-01-06 11:58:46 +00:00
David Baker
ae1262a241
Add schema change file for is_guest flag
2016-01-06 11:58:20 +00:00
David Baker
c79f221192
Add is_guest flag to users db to track whether a user is a guest user or not. Use this so we can run _filter_events_for_client when calculating event_push_actions.
2016-01-06 11:38:09 +00:00
David Baker
eb03625626
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-05 18:39:50 +00:00
Daniel Wagner-Hall
2ef6de928d
Skip, rather than erroring, invalid guest requests
...
Erroring causes problems when people make illegal requests, because they
don't know what limit parameter they should pass.
This is definitely buggy. It leaks message counts for rooms people don't
have permission to see, via tokens. But apparently we already
consciously decided to allow that as a team, so this preserves that
behaviour.
2016-01-05 18:12:37 +00:00
Daniel Wagner-Hall
cfd07aafff
Allow guests to upgrade their accounts
2016-01-05 18:01:18 +00:00
Erik Johnston
8737ead008
Use larger thumbnail rather than smaller.
2016-01-05 17:30:30 +00:00
Erik Johnston
acb19068d0
Return /sync when something under the 'leave' key has changed
2016-01-05 14:49:06 +00:00
David Baker
85ca8cb90c
comment typo
2016-01-05 13:32:39 +00:00
Erik Johnston
c3ea36304b
Use named args
2016-01-05 12:57:45 +00:00
Erik Johnston
1b5642604b
Support inviting 3pids in /createRoom
2016-01-05 11:56:21 +00:00
David Baker
4eb7b950c8
= not == in sql
2016-01-04 18:11:17 +00:00
David Baker
c77e7e60fc
Only joined rooms have unread_notif_count
2016-01-04 15:49:06 +00:00
David Baker
d74c6ace24
comma
2016-01-04 15:32:00 +00:00
David Baker
f1b67730fa
Add unread_notif_count in incremental_sync_with_gap
2016-01-04 14:50:36 +00:00
David Baker
c914d67cda
Rename event-actions to event_push_actions as per PR request
2016-01-04 14:05:37 +00:00
Mark Haines
d2709a5389
Bump changelog and version for v0.12.0
2016-01-04 13:57:39 +00:00
David Baker
928c575c6f
Merge remote-tracking branch 'origin/develop' into store_event_actions
2016-01-04 13:39:51 +00:00
David Baker
3051c9d002
Address minor PR issues
2016-01-04 13:39:29 +00:00
Richard van der Hoff
32d9fd0b26
Expose /login under r0
...
The spec says /login should be available at r0 and 'unstable', so make it so.
2016-01-02 17:24:28 +00:00
Mark Haines
c6e79c84de
Bump version and update changelog for v0.12.0-rc3
2015-12-23 16:15:54 +00:00
Mark Haines
8d6dde7825
Merge pull request #457 from matrix-org/markjh/cached_sync
...
Add a cache for initialSync responses that expires after 5 minutes
2015-12-23 16:04:52 +00:00
Mark Haines
d12c00bdc3
Add some docstring explaining the snapshot cache does
2015-12-23 15:18:11 +00:00
Mark Haines
f3948e001f
Missing yield on guest access auth check
...
Needs matrix-org/sytest#125 to land first
2015-12-23 14:10:06 +00:00
Mark Haines
7fa71e3267
Add a unit test for the snapshot cache
2015-12-23 11:48:03 +00:00
Mark Haines
517fb9a023
Move the doc string to the public facing method
2015-12-22 18:53:47 +00:00
Mark Haines
9ac417fa88
Add a cache for initialSync responses that expires after 5 minutes
2015-12-22 18:27:56 +00:00
David Baker
d2a92c6bde
Fix merge fail with anon access stuff
2015-12-22 18:25:04 +00:00
David Baker
9b4cd0cd0f
pep8 & unused variable
2015-12-22 17:25:09 +00:00
David Baker
140a50f641
Merge remote-tracking branch 'origin/develop' into store_event_actions
2015-12-22 17:23:35 +00:00
David Baker
5645d9747b
Add some comments to areas that could be optimised.
2015-12-22 17:19:22 +00:00
David Baker
4c8f6a7e42
Insert push actions in a single db query rather than one per user/profile_tag
2015-12-22 17:04:31 +00:00
Mark Haines
0ee0138325
Include the list of bad room ids in the error
2015-12-22 15:49:32 +00:00
David Baker
65c451cb38
Add bulk push rule evaluator which actually still evaluates rules one by one, but does far fewer db queries to fetch the rules
2015-12-22 15:19:34 +00:00
Mark Haines
251aafccca
Use a list comprehension
2015-12-22 14:03:24 +00:00
Mark Haines
c058625959
Merge remote-tracking branch 'origin/develop' into markjh/guest_access
...
Conflicts:
synapse/api/filtering.py
2015-12-22 13:58:18 +00:00
Mark Haines
cdd04f7055
Hook up read receipts and typing notifications for guest access
2015-12-22 11:59:55 +00:00
Mark Haines
542ab0f886
Merge branch 'develop' into markjh/guest_access
2015-12-22 11:49:12 +00:00
Mark Haines
b9b4466d0d
Add top level filters for filtering by room id
...
Documented by matrix-org/matrix-doc#246
2015-12-22 11:40:32 +00:00
Mark Haines
c3fff251a9
Allow guest access to /sync
2015-12-22 11:21:03 +00:00
Mark Haines
45a9e0ae0c
Allow guest access if the user provides a list of rooms in the filter
2015-12-22 10:25:46 +00:00
Mark Haines
489a4cd1cf
Add top level filtering by room id
2015-12-21 21:10:41 +00:00
Daniel Wagner-Hall
7f3148865c
Return room avatar URLs in /publicRooms
...
Spec: https://github.com/matrix-org/matrix-doc/pull/244
Tests: https://github.com/matrix-org/sytest/pull/121
2015-12-21 19:38:04 +00:00
David Baker
c061b47c57
Merge remote-tracking branch 'origin/develop' into store_event_actions
2015-12-21 15:30:26 +00:00
David Baker
f73f154ec2
Only run pushers for users on this hs!
2015-12-21 15:28:54 +00:00
Mark Haines
64b6606824
Remove accidentally committed debug logging
2015-12-21 15:22:03 +00:00
David Baker
091c545c4f
pep8
2015-12-21 10:14:57 +00:00
Paul "LeoNerd" Evans
a6ba41e078
Actually look up required remote server key IDs
...
set.union() is a side-effect-free function that returns the union of two
sets. This clearly wanted .update(), which is the side-effecting mutator
version.
2015-12-18 21:36:42 +00:00
Matthew Hodgson
c8ea2d5b1f
Merge pull request #450 from matrix-org/matthew/no-identicons
...
Matthew/no identicons
2015-12-18 18:14:06 +00:00
David Baker
413d0d6a24
Make unread notification count sending work: put the correct count in incremental syncs too, where necessary, and fix silly bugs like only select the event actions for that user...
2015-12-18 17:47:00 +00:00
David Baker
0a2d73fd60
Merge branch 'release-v0.12.0' into develop
2015-12-18 10:07:48 +00:00
David Baker
ce4999268a
Fix typo that broke registration on the mobile clients
2015-12-18 10:07:28 +00:00
Matthew Hodgson
64374bda5b
fix indentation level
2015-12-17 23:04:53 +00:00
Matthew Hodgson
772ad4f715
stop generating default identicons. reverts most of 582019f870
and solves vector-web/vector-im#346
2015-12-17 23:04:20 +00:00
Daniel Wagner-Hall
bdacee476d
Add display_name to 3pid invite in m.room.member invites
2015-12-17 18:55:08 +01:00
Daniel Wagner-Hall
8c5f252edb
Strip address and such out of 3pid invites
...
We're not meant to leak that into the graph
2015-12-17 18:09:51 +01:00
Richard van der Hoff
a64f9bbfe0
Fix 500 error when back-paginating search results
...
We were mistakenly adding pagination clauses to the count query, which then
failed because the count query doesn't join to the events table.
2015-12-17 12:50:46 +00:00
David Baker
42ad49f5b7
still very WIP, but now sends unread_notifications_count in the room object on sync (only actually corrrect in a full sync: hardcoded to 0 in incremental syncs).
2015-12-16 18:42:09 +00:00
Daniel Wagner-Hall
2b0f8a9482
Fix typo
2015-12-16 17:59:44 +01:00
Daniel Wagner-Hall
0311612ce9
Give the IS a bunch more 3pid invite context
...
This allows it to form richer emails
2015-12-16 13:05:32 +00:00
Mark Haines
5fc03449c8
Merge pull request #440 from matrix-org/daniel/ise
...
Include errcode on Internal Server Error
2015-12-16 11:26:55 +00:00
Mark Haines
4fab578b43
Merge branch 'release-v0.12.0' into develop
2015-12-16 11:18:45 +00:00
Mark Haines
dcfc70e8ed
Allow users to change which account a 3pid is bound to
2015-12-15 17:02:21 +00:00
Mark Haines
63fdd9fe0b
Changelog and version bump for v0.12.0-rc2
2015-12-14 16:26:59 +00:00
Mark Haines
3ddf0b9722
Fix spacing
2015-12-14 15:20:59 +00:00
Mark Haines
2acae8300f
Fix logging to lie less
2015-12-14 15:19:37 +00:00
Mark Haines
dbe7892e03
Fix a race between started/stopped stream
2015-12-14 15:09:41 +00:00
Mark Haines
28c5181dfe
Add commentary for fix in PR#442
2015-12-14 14:50:51 +00:00
Mark Haines
15e9885197
Merge branch 'release-v0.12.0' into develop
2015-12-14 14:46:55 +00:00
Mark Haines
8505a4ddc3
Merge pull request #441 from matrix-org/markjh/fts_skip_invalid
...
Skip events that where the body, name or topic isn't a string
2015-12-14 14:42:35 +00:00
Mark Haines
070e28e203
Combine the prev content tests
2015-12-14 14:34:04 +00:00
Mark Haines
834924248f
Check whether prev_content or prev_sender is set before trying to rollback state
2015-12-14 14:09:21 +00:00
Mark Haines
98dfa7d24f
Skip events that where the body, name or topic isn't a string when back populating the FTS index
2015-12-14 13:55:46 +00:00
Daniel Wagner-Hall
338c0a8a69
Include errcode on Internal Server Error
2015-12-14 13:50:50 +00:00
Daniel Wagner-Hall
76e69cc8de
Fix typo
2015-12-14 12:38:55 +00:00
Mark Haines
bfc52a2342
Fix typo in sql for full text search on sqlite3
2015-12-14 11:38:11 +00:00
Mark Haines
deeebbfcb7
Merge branch 'release-v0.12.0' into develop
2015-12-12 14:21:49 +00:00
Mark Haines
1ee7280c4c
Do the /sync in parallel accross the rooms like /initialSync does
2015-12-11 16:48:20 +00:00
Erik Johnston
cde49d3d2b
Merge pull request #435 from matrix-org/erikj/search
...
Include approximate count of search results
2015-12-11 16:27:38 +00:00
Erik Johnston
d9a5c56930
Include approximate count of search results
2015-12-11 11:40:23 +00:00
Erik Johnston
51fb590c0e
Use more efficient query form
2015-12-11 11:12:57 +00:00
David Baker
5e909c73d7
Store nothing instead of ['dont_notify'] for events with no notification required: much as it would be nice to be able to tell between the event not having been processed and there being no notification for it, this isn't worth filling up the table with ['dont_notify'] I think. Consequently treat the empty actions array as dont_notify and filter dont_notify out of the result.
2015-12-10 18:40:28 +00:00
Mark Haines
515548a47a
Missing yield
2015-12-10 17:54:23 +00:00
David Baker
aa667ee396
Save event actions to the db
2015-12-10 17:51:15 +00:00
Mark Haines
7d6b313312
Add caches for whether a room has been forgotten by a user
2015-12-10 17:49:34 +00:00
David Baker
a84a693327
Having consulted The Erikle, this should go at the end of on_receive_pdu, otherwise it will be triggered whenever we backfill too.
2015-12-10 17:18:46 +00:00
Paul "LeoNerd" Evans
99afb4b750
Ensure that the event that gets persisted is the one that was signed
2015-12-10 17:08:21 +00:00
David Baker
21f135ba76
Very first cut of calculating actions for events as they come in. Doesn't store them yet. Not very efficient.
2015-12-10 16:26:08 +00:00
Mark Haines
a8589d1ff3
Mark the version as a -rc1 release candidate
2015-12-10 11:39:00 +00:00
Mark Haines
05f6cb42db
Bump synapse version to v0.12.0
2015-12-09 17:48:02 +00:00
David Baker
a24eedada7
pep8
2015-12-09 15:57:42 +00:00
David Baker
4a728beba1
Split out the push rule evaluator into a separate file so it can be more readily reused. Should be functionally identical.
2015-12-09 15:51:34 +00:00
Mark Haines
e4bfe50e8f
Allow filter JSON object in the filter query parameter in /sync
...
Documented by matrix-org/matrix-doc#224
2015-12-09 12:56:50 +00:00
Daniel Wagner-Hall
0f826b0b0d
Merge pull request #430 from matrix-org/daniel/unstable
...
Merge pull request #430 from matrix-org/daniel/unstable
2015-12-09 11:34:22 +00:00
Erik Johnston
7c2ff8c889
Merge pull request #405 from matrix-org/erikj/search-ts
...
Change the result dict to be a list in /search response
2015-12-08 16:15:27 +00:00
Daniel Wagner-Hall
7a8ba4c9a0
Actually host r0 and unstable prefixes
2015-12-08 15:26:52 +00:00
Mark Haines
6a5ff5f223
Track the time spent in the database per request.
...
and track the number of transactions that request started.
2015-12-07 17:56:11 +00:00
Mark Haines
f7a1cdbbc6
Merge pull request #423 from matrix-org/markjh/archived_flag
...
Only include the archived rooms if a include_leave flag in set in the…
2015-12-07 13:16:03 +00:00
Mark Haines
d547afeae0
Merge remote-tracking branch 'origin/master' into develop
2015-12-07 13:13:43 +00:00
David Baker
9c9b2829ae
also do more structured logging
2015-12-07 12:01:00 +00:00
David Baker
50e5886de1
pep8
2015-12-07 11:57:48 +00:00
David Baker
ba1d740239
Add logging to pushers API to log the body of the request
2015-12-07 11:52:20 +00:00
Mark Haines
a190b2e85e
Merge pull request #427 from matrix-org/markjh/log_context
...
Add a setter for the current log context.
2015-12-07 11:00:12 +00:00
Mark Haines
3dd1630848
Add a setter for the current log context.
...
Move the resource tracking inside that setter so that it is easier
to make sure that the resource tracking isn't double counting the
resource usage.
2015-12-07 10:51:18 +00:00
Daniel Wagner-Hall
41905784f7
Take object not bool
...
Allows bool as legacy fallback
See https://github.com/matrix-org/matrix-doc/pull/212
2015-12-07 10:44:33 +00:00
Mark Haines
660dee94af
Only include the archived rooms if a include_leave flag in set in the filter
2015-12-04 17:32:09 +00:00
Mark Haines
262a97f02b
Merge pull request #422 from matrix-org/markjh/schema
...
Bump schema version.
2015-12-04 15:45:44 +00:00
Mark Haines
d57c5cda71
Bump schema version.
...
As we released version 26 in v0.11.1
2015-12-04 15:28:39 +00:00
Mark Haines
99e1d6777f
Add metrics to track the cpu on the main thread consumed by each type of request
2015-12-04 14:42:24 +00:00
Mark Haines
3c85a317d6
Merge pull request #420 from matrix-org/markjh/resource_usage
...
Track the cpu used in the main thread by each logging context
2015-12-04 14:15:41 +00:00
Mark Haines
5231737369
Add comments to explain why we are hardcoding RUSAGE_THREAD
2015-12-04 11:53:38 +00:00
Mark Haines
d6059bdd2a
Fix warnings
2015-12-04 11:34:23 +00:00
Mark Haines
48a2526d62
Track the cpu used in the main thread by each logging context
2015-12-03 21:03:01 +00:00
Mark Haines
b29d2fd7f8
Merge pull request #419 from matrix-org/markjh/reuse_captcha_client
...
Reuse the captcha client rather than creating a new one for each request
2015-12-03 17:00:59 +00:00
Daniel Wagner-Hall
edfcb83473
Flatten devices into a dict, not a list
2015-12-03 16:19:21 +00:00
Mark Haines
478b4e3ed4
Reuse the captcha client rather than creating a new one for each request
2015-12-03 13:48:55 +00:00
Erik Johnston
b8680b82c3
Merge pull request #414 from matrix-org/erikj/if_not_exists
...
Older versions of SQLite don't like IF NOT EXISTS in virtual tables
2015-12-03 13:21:09 +00:00
Daniel Wagner-Hall
ac213c2e08
Merge pull request #415 from matrix-org/daniel/endpoints
...
Merge pull request #415 from matrix-org/daniel/endpoints
2015-12-03 12:19:12 +00:00
Daniel Wagner-Hall
e880164c59
Merge pull request #418 from matrix-org/daniel/whois
...
Merge pull request #418 from matrix-org/daniel/whois
2015-12-03 12:18:01 +00:00
Daniel Wagner-Hall
526bc33e02
Fix implementation of /admin/whois
2015-12-02 17:29:47 +00:00
David Baker
e515b48929
Just replace the table definition with the one from full_schema 16
2015-12-02 17:23:52 +00:00
David Baker
8810eb8c39
Fix schema delta 15 on postgres in the very unlikley event that anyone upgrades to 15...
2015-12-02 17:19:11 +00:00
Mark Haines
491f3d16dc
Make state updates in the C+S API idempotent
2015-12-02 15:50:50 +00:00
Daniel Wagner-Hall
872c134807
Update endpoints to reflect current spec
2015-12-02 15:45:04 +00:00
Erik Johnston
f721fdbf87
Merge pull request #412 from matrix-org/erikj/search
...
Search: Add prefix matching support
2015-12-02 13:56:41 +00:00
Erik Johnston
976cb5aaa8
Throw if unrecognized DB type
2015-12-02 13:50:43 +00:00
Erik Johnston
b2def42bfd
Older versions of SQLite don't like IF NOT EXISTS in virtual tables
2015-12-02 13:29:14 +00:00
Erik Johnston
b9acef5301
Fix so highlight matching works again
2015-12-02 13:28:13 +00:00
Mark Haines
58d0927767
Merge pull request #410 from matrix-org/markjh/edu_frequency
...
Only fire user_joined_room if the user has actually joined.
2015-12-02 13:17:15 +00:00
Erik Johnston
7dd6e5efca
Remove deuplication. Add comment about regex.
2015-12-02 13:09:37 +00:00
Mark Haines
5dc09e82c4
Merge pull request #413 from matrix-org/markjh/reuse_http_client
...
Reuse a single http client, rather than creating new ones
2015-12-02 12:56:23 +00:00
Mark Haines
c2c70f7daf
Use the context returned by _handle_new_event
2015-12-02 12:01:24 +00:00
Erik Johnston
477da77b46
Search: Add prefix matching support
2015-12-02 11:40:52 +00:00
Mark Haines
37b2d69bbc
Reuse a single http client, rather than creating new ones
2015-12-02 11:36:02 +00:00
David Baker
addb248e0b
Merge pull request #411 from matrix-org/default_dont_notify
...
Change the m.room.message rule to be disabled by default
2015-12-02 11:32:56 +00:00
David Baker
4b1281f9b7
Change the m.room.message rule to be disabled by default so we only notify for 1:1 rooms / highlights out-of-the-box
2015-12-02 11:26:49 +00:00
Mark Haines
dede14f689
Merge branch 'develop' into markjh/edu_frequency
2015-12-02 10:57:51 +00:00
Mark Haines
5eb4d13aaa
Fix typo in collect_presencelike_data
2015-12-02 10:50:58 +00:00
Mark Haines
c30cdb0d68
Add comments
2015-12-02 10:49:35 +00:00
Mark Haines
2a0ec3b89d
Merge branch 'develop' into markjh/edu_frequency
...
Conflicts:
synapse/handlers/federation.py
synapse/handlers/room.py
2015-12-02 10:40:22 +00:00
Erik Johnston
03b2a6a8aa
Merge pull request #409 from MadsRC/develop
...
Develop
2015-12-02 10:08:18 +00:00
Mark Haines
9fbd504b4e
Merge pull request #408 from matrix-org/markjh/distributor_facade
...
Wrap calls to distributor.fire in appropriately named functions
2015-12-02 09:44:56 +00:00
Erik Johnston
9670f226e3
Merge pull request #406 from matrix-org/erikj/search
...
Search: Don't disregard grouping info in pagination tokens
2015-12-02 09:13:20 +00:00
Mads R. Christensen
6863466653
Added a single line to explain what the server_name is used for
2015-12-02 00:37:55 +01:00
Mark Haines
a9526831a4
Wrap calls to distributor.fire in appropriately named functions so that static analysis can work out want is calling what
2015-12-01 20:53:04 +00:00
Mark Haines
ed0f79bdc5
Only fire user_joined_room if the membership has changed
2015-12-01 19:46:15 +00:00
Mark Haines
f73ea0bda2
Merge branch 'develop' into markjh/edu_frequency
2015-12-01 19:15:27 +00:00
Mark Haines
95f30ecd1f
Add API for setting account_data globaly or on a per room basis
2015-12-01 18:41:32 +00:00
Daniel Wagner-Hall
14d7acfad4
Host /unstable and /r0 versions of r0 APIs
2015-12-01 17:34:32 +00:00
Erik Johnston
27c5e1b374
Search: Don't disregard grouping info in pagination tokens
2015-12-01 16:47:18 +00:00
Mark Haines
af96c6f4d3
Merge pull request #404 from matrix-org/markjh/trivial_rename
...
Rename presence_handler.send_invite
2015-12-01 16:11:03 +00:00
Mark Haines
d32db0bc45
Merge pull request #402 from matrix-org/markjh/event_formatting
...
Copy rather than move the fields to shuffle between a v1 and a v2 event.
2015-12-01 16:10:24 +00:00
Mark Haines
3d3da2b460
Only fire user_joined_room on the distributor if the user has actually joined the room
2015-12-01 16:03:08 +00:00
Mark Haines
31069ecf6a
Rename presence_handler.send_invite to presence_handler.send_presence_invite to distinguish it from normal invites
2015-12-01 15:59:45 +00:00
Erik Johnston
71578e2bf2
Change the result tict to be a list
2015-12-01 14:48:35 +00:00
Mark Haines
306415391d
Only add the user_id if the sender is present
2015-12-01 11:14:48 +00:00
Erik Johnston
da7dd58641
Tidy up a bit
2015-12-01 11:06:40 +00:00
Mark Haines
bde8d78b8a
Copy rather than move the fields to shuffle between a v1 and a v2 event.
...
This should make all v1 APIs compatible with v2 clients. While still
allowing v1 clients to access the fields.
This makes the documentation easier since we can just document the v2
format and explain that some of the fields, in some of the APIs are
duplicated for backwards compatibility, rather than having to document
two separate event formats.
2015-11-30 17:46:35 +00:00
Erik Johnston
4dcaa42b6d
Allow paginating search ordered by recents
2015-11-30 17:45:31 +00:00
Erik Johnston
76936f43ae
Return words to highlight in search results
2015-11-27 16:40:42 +00:00
Erik Johnston
17dd5071ef
Allow user to redact with an equal power
...
Users only need their power level to be equal to the redact level for
them to be allowed to redact events.
2015-11-26 11:17:57 +00:00
Daniel Wagner-Hall
df7cf6c0eb
Fix SQL for postgres again
2015-11-23 18:54:41 +00:00
Daniel Wagner-Hall
3e573a5c6b
Fix SQL for postgres
2015-11-23 18:48:53 +00:00
Daniel Wagner-Hall
7dfa455508
Remove size specifier for database column
...
Postgres doesn't support them like this.
We don't have a bool type in common between postgres and sqlite.
2015-11-23 18:35:25 +00:00
Daniel Wagner-Hall
924d85a75e
Merge pull request #375 from matrix-org/daniel/guestroominitialsync
...
Clean up room initialSync for guest users
2015-11-23 16:10:49 +00:00
Mark Haines
c6a15f5026
Merge pull request #385 from matrix-org/daniel/forgetrooms
...
Allow users to forget rooms
2015-11-20 18:07:26 +00:00
Erik Johnston
1b64cb019e
Merge branch 'erikj/perspective_limiter' into release-v0.11.1
2015-11-20 17:24:23 +00:00
Erik Johnston
0eabfa55f6
Fix typo
2015-11-20 17:17:58 +00:00
Erik Johnston
6408541075
Don't limit connections to perspective servers
2015-11-20 17:15:44 +00:00
Erik Johnston
2c1bc4392f
Bump changes and version
2015-11-20 16:35:01 +00:00
Erik Johnston
93f7bb8dd5
Merge pull request #394 from matrix-org/erikj/search
...
Add options for including state in search results
2015-11-20 16:31:24 +00:00
Richard van der Hoff
1d9c1d4166
Merge pull request #389 from matrix-org/rav/flatten_sync_response
...
v2 sync: Get rid of the event_map, and rename the keys of the rooms obj
2015-11-20 15:18:55 +00:00
Erik Johnston
3f151da314
Merge pull request #391 from matrix-org/erikj/remove_token_from_flow
...
Remove m.login.token from advertised flows.
2015-11-20 14:16:59 +00:00
Erik Johnston
6b95a79724
Add option to include the current room state
2015-11-20 14:16:42 +00:00
Erik Johnston
e3dae653e8
Comment
2015-11-20 14:05:22 +00:00
Erik Johnston
9de1f328ad
Merge pull request #393 from matrix-org/erikj/destination_retry_max
...
Use min and not max to set an upper bound on retry interval
2015-11-20 13:41:20 +00:00
Erik Johnston
506874cca9
Optionally include historic profile info
2015-11-20 11:39:44 +00:00
Erik Johnston
2f2bbb4d06
Use min and not max to set an upper bound on retry interval
2015-11-20 09:34:58 +00:00
Daniel Wagner-Hall
95c3306798
Merge branch 'daniel/forgetrooms' of github.com:matrix-org/synapse into daniel/forgetrooms
2015-11-19 15:00:14 -05:00
Daniel Wagner-Hall
df6824a008
Ignore forgotten rooms in v2 sync
2015-11-19 14:54:47 -05:00
Paul "LeoNerd" Evans
dd11bf8a79
Merge branch 'develop' into rav/flatten_sync_response
2015-11-19 17:21:03 +00:00
Paul "LeoNerd" Evans
1cfda3d2d8
Merge branch 'develop' into daniel/forgetrooms
2015-11-19 16:53:13 +00:00
Erik Johnston
8b5349c7bc
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-11-19 16:17:54 +00:00
Erik Johnston
37de8a7f4a
Remove m.login.token from advertised flows.
2015-11-19 16:16:49 +00:00
Mark Haines
7a802ec0ff
Merge pull request #386 from matrix-org/markjh/rename_pud_to_account_data
...
s/private_user_data/account_data/
2015-11-19 15:21:35 +00:00
Daniel Wagner-Hall
248cfd5eb3
Take a boolean not a list of lambdas
2015-11-19 15:16:25 +00:00
Daniel Wagner-Hall
9da4c5340d
Simplify code
2015-11-19 10:07:21 -05:00
Erik Johnston
5fcef78c6a
Bump changes and version
2015-11-19 13:09:48 +00:00
Erik Johnston
06f74068f4
Comment
2015-11-19 13:05:51 +00:00
Richard van der Hoff
f6e092f6cc
Put back the 'state.events' subobject
...
We're keeping 'events', in case we decide to add more keys later.
2015-11-19 12:23:42 +00:00
Richard van der Hoff
24ae0eee8e
v2 /sync: Rename the keys of the 'rooms' object to match member states
...
joined->join
invited->invite
archived->leave
2015-11-19 10:51:12 +00:00
Richard van der Hoff
3c3fc6b268
Flatten the /sync response to remove the event_map
2015-11-19 10:51:11 +00:00
Daniel Wagner-Hall
bed7889703
Apply forgetting properly to historical events
2015-11-18 18:11:12 -05:00
Erik Johnston
037ce4c68f
Split out text for missing config options.
...
This allows packages to more easily override the default messages to
include package specific options.
2015-11-18 18:37:05 +00:00
Mark Haines
d153f482dd
Rename the database table
2015-11-18 15:33:02 +00:00
Mark Haines
1c960fbb80
s/private_user_data/account_data/
2015-11-18 15:31:04 +00:00
Daniel Wagner-Hall
ba26eb3d5d
Allow users to forget rooms
2015-11-17 17:17:30 -05:00
Erik Johnston
cf844e2ad6
Bump changelog and version
2015-11-17 18:48:32 +00:00
Erik Johnston
cbf3cd6151
Add comment
2015-11-17 18:29:29 +00:00
Erik Johnston
cf4ef5f3c7
Only retry federation requests for a long time for background requests
2015-11-17 18:26:50 +00:00
Erik Johnston
afdfd12bdf
Implement required method 'resumeProducing'
2015-11-17 16:57:06 +00:00
Erik Johnston
bceec65913
Slightly more aggressive retry timers at HTTP level
2015-11-17 15:10:05 +00:00
Erik Johnston
9eff52d1a6
Bump changelog and version
2015-11-17 14:38:36 +00:00
Erik Johnston
0186aef814
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.11.0
2015-11-17 14:37:13 +00:00
Steven Hammerton
f20d064e05
Always check guest = true in macaroons
2015-11-17 10:58:05 +00:00
Steven Hammerton
f5e25c5f35
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-17 10:55:41 +00:00
Paul "LeoNerd" Evans
aca6e5bf46
Don't complain if /make_join response lacks 'prev_state' list (SYN-517)
2015-11-13 17:27:25 +00:00
Daniel Wagner-Hall
641420c5e0
Clean up room initialSync for guest users
2015-11-13 15:44:57 +00:00
Daniel Wagner-Hall
9c3f4f8dfd
Allow guests to /room/:room_id/{join,leave}
2015-11-13 11:56:58 +00:00
Erik Johnston
0644f0eb7d
Bump version and change log
2015-11-13 11:43:29 +00:00
Richard van der Hoff
e4d622aaaf
Implementation of state rollback in /sync
...
Implementation of SPEC-254: roll back the state dictionary to how it looked at
the start of the timeline.
Merged PR https://github.com/matrix-org/synapse/pull/373
2015-11-13 10:58:56 +00:00
Richard van der Hoff
fddedd51d9
Fix a few race conditions in the state calculation
...
Be a bit more careful about how we calculate the state to be returned by
/sync. In a few places, it was possible for /sync to return slightly later
state than that represented by the next_batch token and the timeline. In
particular, the following cases were susceptible:
* On a full state sync, for an active room
* During a per-room incremental sync with a timeline gap
* When the user has just joined a room. (Refactor check_joined_room to make it
less magical)
Also, use store.get_state_for_events() (and thus the existing stategroups) to
calculate the state corresponding to a particular sync position, rather than
state_handler.compute_event_context(), which recalculates from first principles
(and tends to miss some state).
Merged from PR https://github.com/matrix-org/synapse/pull/372
2015-11-13 10:39:09 +00:00
Richard van der Hoff
5ab4b0afe8
Make handlers.sync return a state dictionary, instead of an event list.
...
Basically this moves the process of flattening the existing dictionary into a
list up to rest.client.*, instead of doing it in handlers.sync. This simplifies
a bit of the code in handlers.sync, but it is also going to be somewhat
beneficial in the next stage of my hacking on SPEC-254.
Merged from PR #371
2015-11-13 10:35:01 +00:00
Richard van der Hoff
5dea4d37d1
Update some comments
...
Add a couple of type annotations, docstrings, and other comments, in the
interest of keeping track of what types I have.
Merged from pull request #370 .
2015-11-13 10:31:15 +00:00
Daniel Wagner-Hall
fc27ca9006
Merge pull request #369 from matrix-org/daniel/guestnonevents
...
Return non-room events from guest /events calls
2015-11-12 17:28:48 +00:00
Daniel Wagner-Hall
468a2ed4ec
Return non-room events from guest /events calls
2015-11-12 16:45:28 +00:00
Erik Johnston
018b504f5b
Merge pull request #368 from matrix-org/erikj/fix_federation_profile
...
Fix missing profile data in federation joins
2015-11-12 16:30:02 +00:00
Erik Johnston
49f1758d74
Merge pull request #366 from matrix-org/erikj/search_fix_sqlite_faster
...
Use a (hopefully) more efficient SQL query for doing recency based room search
2015-11-12 16:24:32 +00:00
Erik Johnston
c0b3554401
Fix missing profile data in federation joins
...
There was a regression where we stopped including profile data in
initial joins for rooms joined over federation.
2015-11-12 16:19:55 +00:00
Erik Johnston
3de46c7755
Trailing whitespace
2015-11-12 15:36:43 +00:00
Erik Johnston
8fd8e72cec
Expand comment
2015-11-12 15:33:47 +00:00
Richard van der Hoff
78f6010207
Fix an issue with ignoring power_level changes on divergent graphs
...
Changes to m.room.power_levels events are supposed to be handled at a high
priority; however a typo meant that the relevant bit of code was never
executed, so they were handled just like any other state change - which meant
that a bad person could cause room state changes by forking the graph from a
point in history when they were allowed to do so.
2015-11-12 15:24:59 +00:00
Daniel Wagner-Hall
06bfd0a3c0
Merge pull request #367 from matrix-org/daniel/readafterleave
...
Merge pull request #367 from matrix-org/daniel/readafterleave
Tweak guest access permissions
2015-11-12 15:22:02 +00:00
Erik Johnston
764e79d051
Comment
2015-11-12 15:19:56 +00:00
Daniel Wagner-Hall
0d08670f61
Merge pull request #360 from matrix-org/daniel/guestroominitialsync
...
Merge pull request #360 from matrix-org/daniel/guestroominitialsync
Allow guest access to room initialSync
2015-11-12 15:19:55 +00:00
Erik Johnston
320408ef47
Fix SQL syntax
2015-11-12 15:09:45 +00:00
Daniel Wagner-Hall
fb7e260a20
Tweak guest access permissions
...
* Allow world_readable rooms to be read by guests who have joined and
left
* Allow regular users to access world_readable rooms
2015-11-12 15:02:00 +00:00
Erik Johnston
14a9d805b9
Use a (hopefully) more efficient SQL query for doing recency based room search
2015-11-12 14:48:39 +00:00
Erik Johnston
39de87869c
Fix bug where assumed dict was namedtuple
2015-11-12 14:47:48 +00:00
Daniel Wagner-Hall
0a93df5f9c
Allow guests to set their display names
...
Depends: https://github.com/matrix-org/synapse/pull/363
Tests in https://github.com/matrix-org/sytest/pull/66
2015-11-12 13:44:39 +00:00
Daniel Wagner-Hall
50f1afbd5b
Consider joined guest users as joined users
...
Otherwise they're inconveniently allowed to write events to the room
but not to read them from the room.
2015-11-12 13:37:07 +00:00
Daniel Wagner-Hall
6a9c4cfd0b
Fix race creating directories
2015-11-12 11:58:48 +00:00
Erik Johnston
aa3ab6c6a0
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.11.0
2015-11-11 18:17:49 +00:00
Erik Johnston
04034d0b56
Merge pull request #361 from matrix-org/daniel/guestcontext
...
Allow guests to access room context API
2015-11-11 18:17:35 +00:00
Erik Johnston
6341be45c6
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.11.0
2015-11-11 17:51:14 +00:00
Daniel Wagner-Hall
e93d550b79
Allow guests to access room context API
2015-11-11 17:49:44 +00:00
Erik Johnston
e21cef9bb5
Merge pull request #359 from matrix-org/markjh/incremental_indexing
...
Incremental background updates for db indexes
2015-11-11 17:19:51 +00:00
Mark Haines
e1627388d1
Fix param style to work on both sqlite and postgres
2015-11-11 17:14:56 +00:00
Daniel Wagner-Hall
f15ba926cc
Allow guest access to room initialSync
2015-11-11 17:13:24 +00:00
Steven Hammerton
ffdc8e5e1c
Snakes not camels
2015-11-11 14:26:47 +00:00
Mark Haines
940a161192
Fix the background update
2015-11-11 13:59:40 +00:00
Steven Hammerton
2b779af10f
Minor review fixes
2015-11-11 11:21:43 +00:00
Steven Hammerton
dd2eb49385
Share more code between macaroon validation
2015-11-11 11:12:35 +00:00
Daniel Wagner-Hall
cf437900e0
Return world_readable and guest_can_join in /publicRooms
2015-11-10 17:10:27 +00:00
Daniel Wagner-Hall
38d82edf0e
Allow guest users to join and message rooms
2015-11-10 16:57:13 +00:00
Mark Haines
90b503216c
Use a background task to update databases to use the full text search
2015-11-10 16:20:13 +00:00
Mark Haines
a412b9a465
Run the background updates when starting synapse.
2015-11-10 15:50:58 +00:00
Daniel Wagner-Hall
82e8a2d763
Merge pull request #356 from matrix-org/daniel/3pidyetagain
...
Get display name from identity server, not client
2015-11-10 12:44:17 +00:00
Mark Haines
2ede7aa8a1
Add background update task for reindexing event search
2015-11-09 19:29:32 +00:00
Richard van der Hoff
c7db2068c8
Don't fiddle with results returned by event sources
...
Overwriting hashes returned by other methods is poor form.
Fixes: SYN-516
2015-11-09 18:09:46 +00:00
Daniel Wagner-Hall
0d63dc3ec9
Get display name from identity server, not client
2015-11-09 17:26:43 +00:00
Mark Haines
c6a01f2ed0
Add storage module for tracking background updates.
...
The progress for each background update is stored as a JSON blob in the
database. Each background update is broken up into separate batches.
The batch size is automatically tuned to try avoid blocking single
threaded databases for too long.
2015-11-09 17:26:27 +00:00
Richard van der Hoff
9107ed23b7
Add a couple of unit tests for room/<x>/messages
...
... merely because I was trying to figure out how it worked, and couldn't.
2015-11-09 16:16:43 +00:00
Mark Haines
bbe10e8be7
Merge branch 'develop' into markjh/SYN-513
...
Conflicts:
synapse/storage/tags.py
2015-11-09 15:01:59 +00:00
Mark Haines
c4135d85e1
SYN-513: Include updates for rooms that have had all their tags deleted
2015-11-09 14:53:08 +00:00
Matthew Hodgson
dd40fb68e4
fix comedy important missing comma breaking recent-ordered FTS on sqlite
2015-11-08 16:04:37 +00:00
Matthew Hodgson
767c20a869
add a key existence check to tags_by_room to avoid /events 500'ing when testing against vector
2015-11-06 20:49:57 +01:00
Daniel Wagner-Hall
f2c4ee41b9
Remove accidentally added ID column
2015-11-06 14:27:49 +00:00
Steven Hammerton
0b31223c7a
Updates to fallback CAS login to do new token login
2015-11-06 09:57:17 +00:00
Steven Hammerton
fece2f5c77
Merge branch 'develop' into sh-cas-auth-via-homeserver
2015-11-05 20:59:45 +00:00
Erik Johnston
f23af34729
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.11.0
2015-11-05 18:00:51 +00:00
Erik Johnston
6be1b4b113
Merge pull request #350 from matrix-org/erikj/search
...
Implement pagination, order by and groups in search
2015-11-05 17:52:32 +00:00
Erik Johnston
66d36b8e41
Be explicit about what we're doing
2015-11-05 17:26:19 +00:00
Erik Johnston
2aa98ff3bc
Remove redundant test
2015-11-05 17:25:50 +00:00
Erik Johnston
5ee070d21f
Increment by one, not five
2015-11-05 17:25:33 +00:00
Erik Johnston
f1dcaf3296
Bump changelog and version number
2015-11-05 17:20:28 +00:00
Daniel Wagner-Hall
2cebe53545
Exchange 3pid invites for m.room.member invites
2015-11-05 16:43:19 +00:00
Erik Johnston
1ad6222ebf
COMMENTS
2015-11-05 16:29:16 +00:00
Erik Johnston
5bc690408d
Merge pull request #340 from matrix-org/erikj/server_retries
...
Retry dead servers a lot less often
2015-11-05 16:15:50 +00:00
Erik Johnston
3640ddfbf6
Error handling
2015-11-05 16:10:54 +00:00
Erik Johnston
729ea933ea
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/search
2015-11-05 15:43:52 +00:00
Erik Johnston
347146be29
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2015-11-05 15:35:17 +00:00
Erik Johnston
7a5ea067e2
Merge branch 'release-v0.10.1' of github.com:matrix-org/synapse into develop
2015-11-05 15:35:05 +00:00
Erik Johnston
7301e05122
Implement basic pagination for search results
2015-11-05 15:04:08 +00:00
Daniel Wagner-Hall
ca2f90742d
Open up /events to anonymous users for room events only
...
Squash-merge of PR #345 from daniel/anonymousevents
2015-11-05 14:32:26 +00:00
Steven Hammerton
414a4a71b4
Allow hs to do CAS login completely and issue the client with a login token that can be redeemed for the usual successful login response
2015-11-05 14:06:48 +00:00
Mark Haines
7a369e8a55
Merge pull request #347 from matrix-org/markjh/check_filter
...
Remove fields that are both unspecified and unused from the filter checks
2015-11-05 11:15:39 +00:00
Steven Hammerton
45f1827fb7
Add service URL to CAS config
2015-11-04 23:32:30 +00:00
Erik Johnston
05c326d445
Implement order and group by
2015-11-04 17:57:44 +00:00
Daniel Wagner-Hall
4e62ffdb21
Merge branch 'develop' of github.com:matrix-org/synapse into develop
2015-11-04 17:31:01 +00:00
Daniel Wagner-Hall
f522f50a08
Allow guests to register and call /events?room_id=
...
This follows the same flows-based flow as regular registration, but as
the only implemented flow has no requirements, it auto-succeeds. In the
future, other flows (e.g. captcha) may be required, so clients should
treat this like the regular registration flow choices.
2015-11-04 17:29:07 +00:00
Mark Haines
33b3e04049
Merge branch 'develop' into daniel/removesomelies
...
Conflicts:
synapse/notifier.py
2015-11-04 16:01:00 +00:00
Mark Haines
285d056629
Remove fields that are both unspecified and unused from the filter checks, check the right top level definitions in the filter
2015-11-04 15:47:19 +00:00
Mark Haines
c452dabc3d
Remove the LockManager class because it wasn't being used
2015-11-04 14:08:15 +00:00
Mark Haines
f74f48e9e6
Merge pull request #341 from matrix-org/markjh/v2_sync_receipts
...
Include read receipts in v2 sync
2015-11-03 18:45:13 +00:00
Erik Johnston
6a3a840b19
Merge pull request #343 from matrix-org/erikj/fix_retries
...
Fix broken cache for getting retry times.
2015-11-03 17:51:49 +00:00
Mark Haines
a3bfef35fd
Merge branch 'develop' into markjh/v2_sync_receipts
...
Conflicts:
synapse/handlers/sync.py
2015-11-03 17:31:17 +00:00
Mark Haines
6797fcd9ab
Merge pull request #335 from matrix-org/markjh/room_tags
...
Add APIs for adding and removing tags from rooms
2015-11-03 16:45:53 +00:00
Erik Johnston
97d792b28f
Don't rearrange transaction_queue
2015-11-03 16:31:08 +00:00
Erik Johnston
7ce264ce5f
Fix broken cache for getting retry times. This meant we retried remote destinations way more frequently than we should
2015-11-03 16:24:03 +00:00
Mark Haines
06986e46a3
That TODO was done
2015-11-03 14:28:51 +00:00
Mark Haines
5897e773fd
Spell "deferred" more correctly
2015-11-03 14:27:35 +00:00
Mark Haines
2657140c58
Include read receipts in v2 sync
2015-11-02 17:54:04 +00:00
Erik Johnston
eacb068ac2
Retry dead servers a lot less often
2015-11-02 16:56:30 +00:00
Mark Haines
57be722c46
Include room tags in v2 /sync
2015-11-02 16:23:15 +00:00
Daniel Wagner-Hall
771ca56c88
Remove more unused parameters
2015-11-02 15:31:57 +00:00
Mark Haines
ddd8566f41
Store room tag content and return the content in the m.tag event
2015-11-02 15:11:31 +00:00
Daniel Wagner-Hall
192241cf2a
Remove unused arguments and code
2015-11-02 15:10:59 +00:00
Mark Haines
0e36756383
Merge branch 'develop' into markjh/room_tags
2015-11-02 10:57:00 +00:00
Mark Haines
fb46937413
Support clients supplying older tokens, fix short poll test
2015-10-30 16:38:35 +00:00
Mark Haines
79b65f3875
Include tags in v1 room initial sync
2015-10-30 16:28:19 +00:00
Daniel Wagner-Hall
621e84d9a0
Add missing column
2015-10-30 16:25:53 +00:00
Mark Haines
fdf73c6855
Include room tags v1 /initialSync
2015-10-30 16:22:32 +00:00
Mark Haines
d58edd98e9
Update the other place check_joined_room is called
2015-10-30 11:15:37 +00:00