Mark Haines
54cb509d64
Merge pull request #296 from matrix-org/markjh/eventstream_presence
...
Split the sections of EventStreamHandler.get_stream that handle presence
2015-10-12 14:48:09 +01:00
Mark Haines
885301486c
Merge pull request #297 from matrix-org/markjh/presence_races
...
Fix some races in the synapse presence handler caused by not yielding…
2015-10-12 14:47:53 +01:00
Erik Johnston
ae72e247fa
PEP8
2015-10-12 10:50:46 +01:00
Erik Johnston
61561b9df7
Keep FTS indexes up to date. Only search through rooms currently joined
2015-10-12 10:49:53 +01:00
Steven Hammerton
22112f8d14
Formatting changes
2015-10-10 10:49:42 +01:00
Steven Hammerton
c33f5c1a24
Provide ability to login using CAS
2015-10-10 10:49:42 +01:00
Mark Haines
1a46daf621
Merge branch 'markjh/presence_races' into markjh/v2_sync_api
2015-10-09 20:02:30 +01:00
Mark Haines
987803781e
Fix some races in the synapse presence handler caused by not yielding on deferreds
2015-10-09 19:59:50 +01:00
Mark Haines
af7b214476
Merge branch 'markjh/eventstream_presence' into markjh/v2_sync_api
2015-10-09 19:18:09 +01:00
Mark Haines
1b9802a0d9
Split the sections of EventStreamHandler.get_stream that handle presence
...
into separate functions.
This makes the code a bit easier to read, and means that we can reuse
the logic when implementing the v2 sync API.
2015-10-09 19:13:08 +01:00
Erik Johnston
c85c912562
Add basic full text search impl.
2015-10-09 15:48:31 +01:00
Mark Haines
dc72021748
Add a flag to initial sync to indicate we want rooms that the user has left
2015-10-08 17:26:23 +01:00
Mark Haines
dfef2b41aa
Update the v2 room sync format to match the current v2 spec
2015-10-08 15:17:43 +01:00
Daniel Wagner-Hall
61ee72517c
Remove merge thinko
2015-10-06 10:16:15 -05:00
Daniel Wagner-Hall
d4bb28c59b
Revert "Revert "Merge pull request #283 from matrix-org/erikj/atomic_join_federation""
...
This reverts commit 34d26d3687
.
2015-10-06 09:58:21 -05:00
Daniel Wagner-Hall
c05b5ef7b0
Merge branch 'develop' into daniel/3pidinvites
2015-10-06 08:10:34 -05:00
Daniel Wagner-Hall
34d26d3687
Revert "Merge pull request #283 from matrix-org/erikj/atomic_join_federation"
...
This reverts commit 5879edbb09
, reversing
changes made to b43930d4c9
.
2015-10-05 19:10:47 -05:00
Mark Haines
471555b3a8
Move the rooms out into a room_map mapping from room_id to room.
2015-10-05 16:39:36 +01:00
Daniel Wagner-Hall
58e6a58eb7
Merge branch 'develop' into daniel/3pidinvites
2015-10-05 10:33:41 -05:00
Erik Johnston
49ebd472fa
Explicitly add Create event as auth event
2015-10-02 13:22:36 +01:00
Erik Johnston
40017a9a11
Add 'trusted_private_chat' to room creation presets
2015-10-02 11:22:56 +01:00
Erik Johnston
a086b7aa00
Merge pull request #275 from matrix-org/erikj/invite_state
...
Bundle in some room state in invites.
2015-10-02 11:15:43 +01:00
Erik Johnston
9c311dfce5
Also bundle in sender
2015-10-02 11:04:23 +01:00
Erik Johnston
d5e081c7ae
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/unfederatable
2015-10-02 10:33:49 +01:00
Erik Johnston
5879edbb09
Merge pull request #283 from matrix-org/erikj/atomic_join_federation
...
Atomically persist events when joining a room over federation/
2015-10-02 09:18:44 +01:00
Mark Haines
f31014b18f
Start updating the sync API to match the specification
2015-10-01 17:53:07 +01:00
Daniel Wagner-Hall
5b3e9713dd
Implement third party identifier invites
2015-10-01 17:49:52 +01:00
Erik Johnston
0ec78b360c
Merge pull request #287 from matrix-org/erikj/canonical_alias
...
Set m.room.canonical_alias on room creation.
2015-09-30 17:14:55 +01:00
Erik Johnston
ecd0c0dfc5
Remove double indentation
2015-09-30 16:46:24 +01:00
Erik Johnston
83892d0d30
Comment
2015-09-30 16:41:48 +01:00
Erik Johnston
9d39615b7d
Rename var
2015-09-30 16:37:59 +01:00
Mark Haines
301141515a
Merge pull request #288 from matrix-org/markjh/unused_definitions
...
Remove some of the unused definitions from synapse
2015-09-28 14:22:44 +01:00
Erik Johnston
a14665bde7
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/invite_state
2015-09-25 11:38:28 +01:00
Mark Haines
57338a9768
synapse/handlers/room.py:_should_invite_join was unused
2015-09-23 10:26:45 +01:00
Mark Haines
60728c8c9e
synapse/handlers/federation.py:_handle_auth_events was unused
2015-09-23 10:25:26 +01:00
Erik Johnston
257fa1c53e
Set m.room.canonical_alias on room creation.
2015-09-23 10:07:31 +01:00
Erik Johnston
dc6094b908
Merge pull request #271 from matrix-org/erikj/default_history
...
Change default history visibility for private rooms
2015-09-23 09:21:00 +01:00
Mark Haines
ee2d722f0f
Merge pull request #276 from matrix-org/markjh/history_for_rooms_that_have_been_left
...
SPEC-216: Allow users to view the history of rooms that they have left.
2015-09-21 14:38:13 +01:00
Mark Haines
49c0a0b5c4
Clarify that room_initial_sync returns a python dict
2015-09-21 14:21:03 +01:00
Mark Haines
95c304e3f9
Fix doc string to point at the right class
2015-09-21 14:18:47 +01:00
Mark Haines
0c16285989
Add explicit "elif event.membership == Membership.LEAVE" for clarity
2015-09-21 14:17:16 +01:00
Mark Haines
1e101ed4a4
Clamp the "to" token for /rooms/{roomId}/messages to when the user left
...
the room.
There isn't a way for the client to learn a valid "to" token for a room
that they have left in the C-S API but that doesn't stop a client making
one up.
2015-09-21 14:13:10 +01:00
Erik Johnston
c34ffd2736
Fix getting an event for a room the server forgot it was in
2015-09-17 10:26:03 +01:00
Erik Johnston
54e688277a
Also persist state
2015-09-17 10:26:03 +01:00
Erik Johnston
3a01901d6c
Capture err
2015-09-17 10:26:03 +01:00
Erik Johnston
744e7d2790
Also handle state
2015-09-17 10:26:03 +01:00
Erik Johnston
a3e332af19
Don't bail out of joining if we encounter a rejected event
2015-09-17 10:26:03 +01:00
Erik Johnston
4678055173
Refactor do_invite_join
2015-09-17 10:24:51 +01:00
Erik Johnston
d59acb8c5b
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/unfederatable
2015-09-14 18:05:31 +01:00
Mark Haines
e2054ce21a
Allow users to GET individual state events for rooms that they have left
2015-09-10 15:06:47 +01:00
Erik Johnston
49ae42bbe1
Bundle in some room state in the unsigned bit of the invite when sending to invited servers
2015-09-10 14:25:54 +01:00
Mark Haines
09cb5c7d33
Allow users that have left a room to get the messages that happend in the room before they left
2015-09-09 17:31:09 +01:00
Mark Haines
3c166a24c5
Remove undocumented and unimplemented 'feedback' parameter from the Client-Server API
2015-09-09 16:05:09 +01:00
Mark Haines
bc8b25eb56
Allow users that have left the room to view the member list from the point they left
2015-09-09 15:42:16 +01:00
Mark Haines
1d579df664
Allow rooms/{roomId}/state for a room that has been left
2015-09-09 14:12:24 +01:00
Mark Haines
89ae0166de
Allow room initialSync for users that have left the room, returning a snapshot of how the room was when they left it
2015-09-09 13:25:22 +01:00
Daniel Wagner-Hall
81a93ddcc8
Allow configuration to ignore invalid SSL certs
...
This will be useful for sytest, and sytest only, hence the aggressive
config key name.
2015-09-09 12:02:07 +01:00
Erik Johnston
e530208e68
Change default history visibility for private rooms
2015-09-09 09:57:49 +01:00
Mark Haines
dd42bb78d0
Include rooms that a user has left in an initialSync. Include the state and messages at the point they left the room
2015-09-08 18:16:09 +01:00
Daniel Wagner-Hall
77580addc3
Merge pull request #262 from matrix-org/redactyoself
...
Allow users to redact their own events
2015-09-02 10:02:36 +01:00
Erik Johnston
a88e16152f
Add flag which disables federation of the room
2015-09-01 15:47:30 +01:00
Daniel Wagner-Hall
b143641b20
Merge pull request #258 from matrix-org/slowtestsmakemesad
...
Swap out bcrypt for md5 in tests
2015-08-28 15:42:25 +01:00
Daniel Wagner-Hall
4d1ea40008
Merge branch 'develop' into redactyoself
...
Conflicts:
synapse/handlers/_base.py
2015-08-28 15:35:39 +01:00
Daniel Wagner-Hall
8256a8ece7
Allow users to redact their own events
2015-08-28 15:31:49 +01:00
Mark Haines
a7122692d9
Merge branch 'release-v0.10.0' into develop
...
Conflicts:
synapse/handlers/auth.py
synapse/python_dependencies.py
synapse/rest/client/v1/login.py
2015-08-28 11:15:27 +01:00
Daniel Wagner-Hall
86fac9c95e
Remove unused import
2015-08-26 16:03:17 +01:00
Daniel Wagner-Hall
3063383547
Swap out bcrypt for md5 in tests
...
This reduces our ~8 second sequential test time down to ~7 seconds
2015-08-26 15:59:32 +01:00
Daniel Wagner-Hall
d3c0e48859
Merge erikj/user_dedup to develop
2015-08-26 13:42:45 +01:00
Erik Johnston
da51acf0e7
Remove needless existence checks
2015-08-26 11:08:23 +01:00
Erik Johnston
f4d552589e
Don't loop over all rooms ever in typing.get_new_events_for_user
2015-08-26 10:51:08 +01:00
Daniel Wagner-Hall
825f0875bc
Fix up one more reference
2015-08-25 16:37:37 +01:00
Daniel Wagner-Hall
a0b181bd17
Remove completely unused concepts from codebase
...
Removes device_id and ClientInfo
device_id is never actually written, and the matrix.org DB has no
non-null entries for it. Right now, it's just cluttering up code.
This doesn't remove the columns from the database, because that's
fiddly.
2015-08-25 16:23:06 +01:00
Erik Johnston
51c53369a3
Do auth checks *before* persisting the event
2015-08-24 16:38:20 +01:00
Erik Johnston
f8f3d72e2b
Don't make pushers handle presence/typing events
2015-08-24 16:19:43 +01:00
Erik Johnston
fd5ad0f00e
Doc string
2015-08-21 11:45:43 +01:00
Erik Johnston
745b72660a
Merge branch 'release-v0.10.0' of github.com:matrix-org/synapse into develop
2015-08-21 11:39:38 +01:00
Erik Johnston
42f12ad92f
When logging in fetch user by user_id case insensitively, *unless* there are multiple case insensitive matches, in which case require the exact user_id
2015-08-21 11:38:44 +01:00
Erik Johnston
aa3c9c7bd0
Don't allow people to register user ids which only differ by case to an existing one
2015-08-21 10:57:47 +01:00
Erik Johnston
3e9ee62db0
Add missing param in store.get_state_groups invocation
2015-08-21 09:15:13 +01:00
Daniel Wagner-Hall
c7788685b0
Fix bad merge
2015-08-20 17:43:12 +01:00
Daniel Wagner-Hall
8c74bd8960
Fix indentation
2015-08-20 17:26:52 +01:00
Daniel Wagner-Hall
ea570ffaeb
Fix flake8 warnings
2015-08-20 17:22:41 +01:00
Daniel Wagner-Hall
d5a825edee
Merge branch 'auth' into refresh
...
Conflicts:
synapse/handlers/register.py
2015-08-20 17:13:33 +01:00
Daniel Wagner-Hall
225c244aba
Remove incorrect whitespace
2015-08-20 17:10:10 +01:00
Daniel Wagner-Hall
ce2a7ed6e4
Merge branch 'develop' into auth
2015-08-20 16:28:36 +01:00
Daniel Wagner-Hall
e8cf77fa49
Merge branch 'develop' into refresh
...
Conflicts:
synapse/rest/client/v1/login.py
2015-08-20 16:25:40 +01:00
Daniel Wagner-Hall
cecbd636e9
/tokenrefresh POST endpoint
...
This allows refresh tokens to be exchanged for (access_token,
refresh_token).
It also starts issuing them on login, though no clients currently
interpret them.
2015-08-20 16:21:35 +01:00
Erik Johnston
c141d47a28
Merge pull request #235 from matrix-org/erikj/room_avatars
...
Add m.room.avatar to default power levels.
2015-08-20 16:07:49 +01:00
David Baker
ca0d28ef34
Another use of check_password that got missed in the yield fix
2015-08-20 15:35:14 +01:00
Erik Johnston
9b63def388
Add m.room.avatar to default power levels. Change default required power levels of such events to 50
2015-08-20 14:35:40 +01:00
Daniel Wagner-Hall
617501dd2a
Move token generation to auth handler
...
I prefer the auth handler to worry about all auth, and register to call
into it as needed, than to smatter auth logic between the two.
2015-08-20 11:35:56 +01:00
Erik Johnston
cbd053bb8f
Merge pull request #233 from matrix-org/erikj/canonical_alias
...
Add server side support for canonical aliases
2015-08-20 11:26:09 +01:00
Daniel Wagner-Hall
ade5342752
Merge branch 'auth' into refresh
2015-08-20 11:03:47 +01:00
Mark Haines
a0b8e5f2fe
Merge pull request #211 from matrix-org/email_in_use
...
Changes for unique emails
2015-08-20 10:04:04 +01:00
Erik Johnston
aadb2238c9
Check that the canonical room alias actually points to the room
2015-08-20 09:55:04 +01:00
Daniel Wagner-Hall
f9e7493ac2
Merge branch 'develop' into auth
2015-08-19 15:20:09 +01:00
Daniel Wagner-Hall
70e265e695
Re-add whitespace around caveat operators
2015-08-19 14:30:31 +01:00
Erik Johnston
daa01842f8
Don't get apservice interested rooms in RoomHandler.get_joined_rooms_for_users
2015-08-19 13:46:03 +01:00
Erik Johnston
d7272f8d9d
Add canonical alias to the default power levels
2015-08-19 12:03:09 +01:00
Erik Johnston
40da1f200d
Remove an access token log line
2015-08-19 09:41:07 +01:00
Erik Johnston
abc6986a24
Fix regression where we incorrectly responded with a 200 to /login
2015-08-19 09:31:11 +01:00
Daniel Wagner-Hall
ce832c38d4
Remove padding space around caveat operators
2015-08-18 17:39:26 +01:00
Erik Johnston
38a965b816
Merge pull request #227 from matrix-org/erikj/receipts_take2
...
Re-enable receipts API.
2015-08-18 16:30:04 +01:00
Daniel Wagner-Hall
3e6fdfda00
Fix some formatting to use tuples
2015-08-18 15:18:50 +01:00
Daniel Wagner-Hall
1469141023
Merge branch 'develop' into auth
2015-08-18 14:43:44 +01:00
Daniel Wagner-Hall
2d3462714e
Issue macaroons as opaque auth tokens
...
This just replaces random bytes with macaroons. The macaroons are not
inspected by the client or server.
In particular, they claim to have an expiry time, but nothing verifies
that they have not expired.
Follow-up commits will actually enforce the expiration, and allow for
token refresh.
See https://bit.ly/matrix-auth for more information
2015-08-18 14:22:02 +01:00
Erik Johnston
0d4abf7777
Typo
2015-08-18 11:19:08 +01:00
Erik Johnston
e55291ce5e
None check
2015-08-18 11:17:37 +01:00
Erik Johnston
83eb627b5a
More helpful variable names
2015-08-18 10:33:11 +01:00
Erik Johnston
776ee6d92b
Doc strings
2015-08-18 10:30:07 +01:00
Erik Johnston
f72ed6c6a3
Remove debug try/catch
2015-08-18 10:29:49 +01:00
Erik Johnston
afef6f5d16
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts_take2
2015-08-17 13:23:44 +01:00
Erik Johnston
1a9510bb84
Implement a batched presence_handler.get_state and use it
2015-08-17 10:40:23 +01:00
Daniel Wagner-Hall
30883d8409
Merge pull request #221 from matrix-org/auth
...
Simplify LoginHander and AuthHandler
2015-08-14 17:02:22 +01:00
Erik Johnston
129ee4e149
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts_take2
2015-08-13 17:28:43 +01:00
Erik Johnston
9f7f228ec2
Remove pointless map
2015-08-13 17:20:59 +01:00
Erik Johnston
7e77a82c5f
Re-enable receipts
2015-08-13 16:58:10 +01:00
Erik Johnston
7b0e797080
Fix _filter_events_for_client
2015-08-12 17:05:24 +01:00
Daniel Wagner-Hall
5ce903e2f7
Merge password checking implementations
2015-08-12 16:09:19 +01:00
Erik Johnston
a7eeb34c64
Simplify staggered deferred lists
2015-08-12 16:02:05 +01:00
Erik Johnston
f7e2f981ea
Use list comprehension instead of filter
2015-08-12 16:01:10 +01:00
Daniel Wagner-Hall
415c2f0549
Simplify LoginHander and AuthHandler
...
* Merge LoginHandler -> AuthHandler
* Add a bunch of documentation
* Improve some naming
* Remove unused branches
I will start merging the actual logic of the two handlers shortly
2015-08-12 15:49:37 +01:00
Erik Johnston
dc8399ee00
Remove debug loggers
2015-08-11 11:30:59 +01:00
Erik Johnston
1b994a97dd
Fix application of ACLs
2015-08-11 10:41:40 +01:00
Erik Johnston
ffdb8c3828
Don't be too enthusiatic with defer.gatherResults
2015-08-07 18:13:48 +01:00
Erik Johnston
07507643cb
Use dictionary cache to do group -> state fetching
2015-08-05 15:11:42 +01:00
David Baker
c77048e12f
Add endpoint that proxies ID server request token and errors if the given email is in use on this Home Server.
2015-08-04 14:37:09 +01:00
Erik Johnston
2e35a733cc
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/acl_perf
2015-08-04 13:00:52 +01:00
Erik Johnston
4d6cb8814e
Speed up event filtering (for ACL) logic
2015-08-04 09:32:23 +01:00
David Baker
28d07a02e4
Add vector.im as trusted ID server
2015-08-03 15:31:21 +01:00
Kegan Dougal
a4d62ba36a
Fix v2_alpha registration. Add unit tests.
...
V2 Registration forced everyone (including ASes) to create a password for a
user, when ASes should be able to omit passwords. Also unbreak AS registration
in general which checked too early if the given username was claimed by an AS;
it was checked before knowing if the AS was the one doing the registration! Add
unit tests for AS reg, user reg and disabled_registration flag.
2015-07-28 17:34:12 +01:00
Matrix
4e2e67fd50
Disable receipts for now
2015-07-22 16:13:46 +01:00
Matrix
4cab2cfa34
Don't do any database hits in receipt handling if from_key == to_key
2015-07-18 19:07:12 +01:00
Erik Johnston
b6d4a4c6d8
Merge pull request #199 from matrix-org/erikj/receipts
...
Implement read receipts.
2015-07-16 18:18:36 +01:00
Erik Johnston
d155b318d2
Merge pull request #203 from matrix-org/erikj/room_creation_presets
...
Implement presets at room creation
2015-07-16 18:18:11 +01:00
Erik Johnston
c456d17daf
Implement specifying custom initial state for /createRoom
2015-07-16 15:25:29 +01:00
David Baker
4da05fa0ae
Add back in support for remembering parameters submitted to a user-interactive auth call.
2015-07-15 19:28:57 +01:00
Erik Johnston
baa55fb69e
Merge pull request #193 from matrix-org/erikj/bulk_persist_event
...
Add bulk insert events API
2015-07-14 10:49:24 +01:00
Erik Johnston
002a44ac1a
s/everyone_ops/original_invitees_have_ops/
2015-07-14 10:37:42 +01:00
Erik Johnston
b49a30a972
Capitalize contants
2015-07-14 10:20:31 +01:00
Erik Johnston
4624d6035e
Docs
2015-07-14 10:19:07 +01:00
Erik Johnston
d5cc794598
Implement presets at room creation
2015-07-13 16:56:08 +01:00
Erik Johnston
5989637f37
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/receipts
2015-07-13 13:50:57 +01:00
Erik Johnston
e5991af629
Comments
2015-07-13 13:30:43 +01:00
Erik Johnston
532fcc997a
Merge pull request #196 from matrix-org/erikj/room_history
...
Add ability to restrict room history.
2015-07-10 13:47:04 +01:00
Erik Johnston
b5f0d73ea3
Add comment
2015-07-09 17:09:26 +01:00
Erik Johnston
f0979afdb0
Remove spurious comment
2015-07-09 16:02:07 +01:00
Erik Johnston
c2d08ca62a
Integer timestamps
2015-07-09 13:15:34 +01:00
Erik Johnston
1af188209a
Change format of receipts to allow inclusion of data
2015-07-09 11:39:30 +01:00
Erik Johnston
af812b68dd
Add a cache to fetching of receipt streams
2015-07-08 15:35:00 +01:00
Erik Johnston
d85ce8d89b
Split receipt events up into one per room
2015-07-08 11:36:05 +01:00
Muthu Subramanian
f53bae0c19
code beautify
2015-07-08 16:05:46 +05:30
Muthu Subramanian
81682d0f82
Integrate SAML2 basic authentication - uses pysaml2
2015-07-08 15:36:54 +05:30
Erik Johnston
87311d1b8c
Hook up receipts to v1 initialSync
2015-07-08 11:02:04 +01:00
Erik Johnston
ca041d5526
Wire together receipts and the notifer/federation
2015-07-07 15:25:30 +01:00
Erik Johnston
716e426933
Fix various typos
2015-07-07 10:55:31 +01:00
Erik Johnston
1a3255b507
Add m.room.history_visibility to newly created rooms' m.room.power_levels
2015-07-06 13:25:35 +01:00
Erik Johnston
fb47c3cfbe
Rename key and values for m.room.history_visibility. Support 'invited' value
2015-07-06 13:05:52 +01:00
Erik Johnston
c3e2600c67
Filter and redact events that the other server doesn't have permission to see during backfill
2015-07-03 17:52:57 +01:00
Erik Johnston
400894616d
Respect m.room.history_visibility in v2_alpha sync API
2015-07-03 14:51:01 +01:00
Erik Johnston
41938afed8
Make v1 initial syncs respect room history ACL
2015-07-02 17:12:35 +01:00
Erik Johnston
1a60545626
Add basic impl for room history ACL on GET /messages client API
2015-07-02 16:20:10 +01:00
Erik Johnston
bd1236c0ee
Consolidate duplicate code in notifier
2015-07-02 11:46:05 +01:00
Erik Johnston
0862fed2a8
Add basic ReceiptHandler
2015-07-01 17:19:31 +01:00
Erik Johnston
5130d80d79
Add bulk insert events API
2015-06-25 17:29:34 +01:00
Erik Johnston
9bf61ef97b
Merge pull request #189 from matrix-org/erikj/room_init_sync
...
Improve room init sync speed.
2015-06-19 11:36:06 +01:00
Kegan Dougal
d88e20cdb9
Fix bug where synapse was sending AS user queries incorrectly.
...
Bug introduced in 92b20713d7
which reversed the comparison when checking if a user existed
in the users table. Added UTs to prevent this happening again.
2015-06-17 17:26:03 +01:00
Erik Johnston
eceb554a2f
Use another deferred list
2015-06-16 17:12:27 +01:00
Erik Johnston
b849a64f8d
Use DeferredList
2015-06-16 17:03:24 +01:00
Erik Johnston
0460406298
Don't do unecessary db ops in presence.get_state
2015-06-16 16:59:38 +01:00
Erik Johnston
8047fd2434
Merge pull request #176 from matrix-org/erikj/backfill_auth
...
Improve backfill.
2015-06-03 17:25:37 +01:00
Erik Johnston
3bbd0d0e09
Merge pull request #180 from matrix-org/erikj/prev_state_context
...
Don't needlessly compute prev_state
2015-06-03 17:20:56 +01:00
Erik Johnston
55bf90b9e4
Don't needlessly compute prev_state
2015-06-03 16:44:24 +01:00
Erik Johnston
1c3d844e73
Don't needlessly compute context
2015-06-03 16:41:51 +01:00
Erik Johnston
09e23334de
Add a timeout
2015-06-02 11:00:37 +01:00
Erik Johnston
02410e9239
Handle the fact we might be missing auth events
2015-06-02 10:58:35 +01:00
Erik Johnston
e552b78d50
Add some logging
2015-06-02 10:28:14 +01:00
Erik Johnston
fde0da6f19
Correctly look up auth_events
2015-06-02 10:19:38 +01:00
Erik Johnston
3f04a08a0c
Don't process events we've already processed. Remember to process state events
2015-06-02 10:11:32 +01:00
Erik Johnston
4bbfbf898e
Correctly pass in auth_events
2015-06-01 17:02:23 +01:00
Mark Haines
784aaa53df
Merge branch 'develop' into markjh/SYT-8-recaptcha
...
Conflicts:
synapse/handlers/auth.py
2015-05-29 13:49:44 +01:00
Mark Haines
d94590ed48
Add config for setting the recaptcha verify api endpoint, so we can test it in sytest
2015-05-29 12:11:40 +01:00
Erik Johnston
afbd3b2fc4
SYN-395: Fix CAPTCHA, don't double decode json
2015-05-28 18:05:00 +01:00
Mark Haines
d9f60e8dc8
Merge pull request #163 from matrix-org/markjh/presence_list_cache
...
Add a cache for the presence list
2015-05-22 17:02:23 +01:00
Mark Haines
1a9a9abcc7
Add a cache for getting the presence list for a user
2015-05-22 16:11:17 +01:00
Erik Johnston
74b7de83ec
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/backfill_fixes
2015-05-22 16:10:42 +01:00
Mark Haines
36317f3dad
Merge pull request #156 from matrix-org/erikj/join_perf
...
Make joining #matrix:matrix.org over federation quicker
2015-05-22 16:09:54 +01:00
Mark Haines
49a2c10279
Merge pull request #157 from matrix-org/markjh/presence_performance
...
Improve presence performance in loadtest
2015-05-22 16:04:40 +01:00
Mark Haines
106a3051b8
Remove spurious TODO comment
2015-05-22 15:53:03 +01:00
Mark Haines
c8135f808b
Remove unused import
2015-05-22 14:45:46 +01:00
Mark Haines
f43544eecc
Make the appservice use 'users_in_room' rather than get_room_members since it is cached
2015-05-22 11:01:28 +01:00
Erik Johnston
4429e720ae
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-05-22 10:33:00 +01:00
Mark Haines
53447e9cd3
Add caches for things requested by the pushers
2015-05-21 16:41:39 +01:00
Mark Haines
7ae8afb7ef
Removed unused 'is_visible' method
2015-05-20 14:48:11 +01:00
Mark Haines
e01b825cc9
Clean up the presence_list checking logic a bit
2015-05-20 13:21:59 +01:00
Erik Johnston
20814fabdd
Actually fetch state for new backwards extremeties when backfilling.
2015-05-20 11:59:02 +01:00
Erik Johnston
7223129916
Don't apply new room join hack if depth > 5
2015-05-19 14:16:08 +01:00
Erik Johnston
5e7883ec19
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/join_perf
2015-05-19 10:50:43 +01:00
Mark Haines
e4c65b338d
Speed up the get_pagination_rows as well
2015-05-18 18:21:06 +01:00
Erik Johnston
ef910a0358
Do work in parellel when joining a room
2015-05-18 17:17:04 +01:00
Mark Haines
591c4bf223
Cache the most recent serial for each room
2015-05-18 16:21:51 +01:00
Mark Haines
e1150cac4b
Move updating the serial and state of the presence cache into a single function
2015-05-18 15:46:37 +01:00
Mark Haines
880fb46de0
Merge branch 'notifier_performance' into markjh/presence_performance
2015-05-18 14:33:58 +01:00
Mark Haines
0b0033c40b
Merge branch 'develop' into notifier_performance
2015-05-18 13:50:01 +01:00
Mark Haines
755def8083
Add more doc string, reduce C+P boilerplate for getting room list
2015-05-18 13:46:47 +01:00
Mark Haines
415b158ce2
More whitespace
2015-05-15 11:09:47 +01:00
Mark Haines
0a4330cd5d
Add some missed argument types, cleanup the whitespace a bit
2015-05-14 17:48:12 +01:00
Mark Haines
47ec693e29
More doc-strings
2015-05-14 17:07:02 +01:00
Mark Haines
c5d1b4986b
Remove unused arguments and doc PresenceHandler.push_update_to_clients
2015-05-14 14:59:31 +01:00
David Baker
67800f7626
Treat setting your display name to the empty string as removing it (SYN-186).
2015-05-14 14:19:59 +01:00
David Baker
92e1c8983d
Disallow whitespace in aliases here too
2015-05-14 13:21:55 +01:00
David Baker
0c894e1ebd
Throw error when creating room if alias contains whitespace #SYN-335
2015-05-14 13:11:28 +01:00
Mark Haines
899d4675dd
Merge branch 'notifier_unify' into notifier_performance
2015-05-14 11:36:44 +01:00
Mark Haines
3edd2d5c93
Fix v2 sync, update the last_notified_ms only if there was an active listener
2015-05-14 11:25:30 +01:00
Mark Haines
63878c0379
Don't bother checking for updates if the stream token hasn't advanced for a user
2015-05-13 13:42:21 +01:00
Erik Johnston
80fd2b574c
Don't talk to yourself when backfilling
2015-05-12 16:19:46 +01:00
Mark Haines
d7b3ac46f8
Revert "Improvement to performance of presence event stream handling"
2015-05-12 15:44:21 +01:00
Mark Haines
c167cbc9fd
Merge pull request #147 from matrix-org/presence-performance
...
Improvement to performance of presence event stream handling
2015-05-12 15:24:54 +01:00
Mark Haines
a6fb2aa2a5
Merge pull request #144 from matrix-org/erikj/logging_context
...
Preserving logging contexts
2015-05-12 15:23:50 +01:00
Erik Johnston
07a1223156
s/backfil/backfill/
2015-05-12 14:09:54 +01:00
Erik Johnston
0d31ad5101
Typos everywhere
2015-05-12 14:02:01 +01:00
Erik Johnston
a0dfffb33c
And another typo.
2015-05-12 14:00:31 +01:00
Erik Johnston
6e5ac4a28f
Err, gatherResults doesn't take a dict...
2015-05-12 13:58:14 +01:00
Erik Johnston
95dedb866f
Unwrap defer.gatherResults failures
2015-05-12 13:14:29 +01:00
Erik Johnston
367382b575
Handle the case where the other side is unreachable when backfilling
2015-05-12 10:35:45 +01:00
Erik Johnston
4df11b5039
Make get_current_token accept a direction parameter, which tells whether the source whether we want a token for going 'forwards' or 'backwards'
2015-05-12 10:28:10 +01:00
Erik Johnston
84e6b4001f
Initial hack at wiring together pagination and backfill
2015-05-11 18:01:31 +01:00
Erik Johnston
2236ef6c92
Fix up leak. Add warnings.
2015-05-08 19:53:34 +01:00
Erik Johnston
4ac1941592
PEP8
2015-05-08 16:33:01 +01:00
Erik Johnston
476899295f
Change the way we do logging contexts so that they survive divergences
2015-05-08 16:32:18 +01:00
Paul "LeoNerd" Evans
45543028bb
Use the presence cachemap ordering to early-abort the iteration loop
2015-05-07 22:40:10 +01:00
Paul "LeoNerd" Evans
f683b5de47
Store presence cachemap in an ordered dict, so that the newer serials will be at the end
2015-05-07 21:27:53 +01:00
Mark Haines
dfa98f911b
revert accidental bcrypt gensalt round reduction from loadtesting
2015-05-07 17:45:42 +01:00
Mark Haines
ef8e8ebd91
pynacl-0.3.0 was released so we can finally start using it directly from pypi
2015-05-07 16:46:51 +01:00
Erik Johnston
2d386d7038
That wasn't a deferred
2015-05-01 14:41:25 +01:00
Erik Johnston
4ac2823b3c
Remove inlineCallbacks from non-generator
2015-05-01 14:41:25 +01:00
Erik Johnston
42c12c04f6
Remove some run_on_reactors
2015-05-01 14:41:25 +01:00
David Baker
92b20713d7
More missed get_user_by_id API changes
2015-05-01 13:45:54 +01:00
Erik Johnston
da4ed08739
One too many lens
2015-05-01 13:29:38 +01:00
Erik Johnston
9060dc6b59
Change public room list to use defer.gatherResults
2015-05-01 13:28:36 +01:00
David Baker
1fae1b3166
This api now no longer returns an array
2015-05-01 13:26:41 +01:00
Erik Johnston
1d7702833d
Make simple query rather than long one and then throw away half the results
2015-04-30 10:16:12 +01:00
Erik Johnston
a6e62cf6d0
Fix off by one in presence token handling
2015-04-29 17:37:11 +01:00
David Baker
9927170787
Accept camelcase + underscores in binding too
2015-04-29 15:57:09 +01:00
David Baker
109c8aafd2
Fix includes
2015-04-29 15:45:44 +01:00
David Baker
b7788f80a3
Accept both camelcase and underscore threepid creds for transition
2015-04-29 15:41:29 +01:00
Erik Johnston
1783c7ca92
Ensure we never miss any presence updates
2015-04-28 17:24:24 +01:00
Erik Johnston
0126ef7f3c
Fix typo
2015-04-28 17:23:53 +01:00
Erik Johnston
d98edb548a
Ensure the serial returned by presence is always an integer
2015-04-28 17:20:32 +01:00
Erik Johnston
327ca883ec
Merge branch 'develop' of github.com:matrix-org/synapse into postgres
2015-04-28 13:39:42 +01:00
Mark Haines
9182f87664
Merge pull request #126 from matrix-org/csauth
...
Client / Server Auth Refactor
2015-04-28 11:00:27 +01:00
Paul "LeoNerd" Evans
38432d8c25
Merge branch 'develop' into invite_power_level
2015-04-27 17:09:25 +01:00
Erik Johnston
6f8e2d517e
Merge branch 'develop' of github.com:matrix-org/synapse into postgres
2015-04-27 14:41:40 +01:00
David Baker
412ece18e7
Add commentage.
2015-04-27 14:08:45 +01:00
David Baker
1bac74b9ae
Change to https for ID server communication
2015-04-24 14:48:49 +01:00
David Baker
a218619626
Use underscores instead of camelcase for id server stuff
2015-04-24 11:27:38 +01:00
David Baker
f7a79a37be
pep8
2015-04-24 09:42:37 +01:00
David Baker
6532b6e607
Merge branch 'develop' into csauth
...
Conflicts:
synapse/http/server.py
2015-04-24 09:37:54 +01:00
Paul "LeoNerd" Evans
e1e5e53127
Remove users from the remote_offline_serials list (and clean up empty elements) when they go online again
2015-04-23 19:01:37 +01:00
Paul "LeoNerd" Evans
b3bda8a75f
Don't let the remote offline serial list grow arbitrarily large
2015-04-23 18:40:47 +01:00
Paul "LeoNerd" Evans
8a785c3006
Store a list of the presence serial number at which remote users went offline, so that when we delete them from the cachemap, we can still synthesize OFFLINE events for them (SYN-261)
2015-04-23 18:40:19 +01:00
Paul "LeoNerd" Evans
191f7f09ce
Generate presence event-stream JSON structures directly
2015-04-23 18:27:25 +01:00
David Baker
0eb61a3d16
Remove ultimately unused feature of saving params from the first call in the session: it's probably too open to abuse.
2015-04-23 14:44:12 +01:00
Paul "LeoNerd" Evans
48b6ee2b67
Create an 'invite' powerlevel when making new rooms
2015-04-21 21:07:35 +01:00
Mark Haines
24d21887ed
SYN-350: Don't ratelimit the individual events generated during room creation
2015-04-21 14:14:19 +01:00
David Baker
8db6832db8
Password reset, finally.
2015-04-17 19:53:47 +01:00
David Baker
4eea5cf6c2
pep8
2015-04-17 16:46:45 +01:00
David Baker
f96ab9d18d
make add3pid servlet work
2015-04-17 16:44:49 +01:00
David Baker
cb03fafdf1
Merge branch 'develop' into csauth
2015-04-17 13:51:10 +01:00
David Baker
83b554437e
Need to yield the username check, otherwise very very weird things happen.
2015-04-17 12:57:25 +01:00
Erik Johnston
6ba2e3df4e
Merge branch 'develop' of github.com:matrix-org/synapse into postgres
2015-04-17 11:22:31 +01:00
David Baker
4cd5fb13a3
Oops, left debugging in.
2015-04-16 20:03:13 +01:00
David Baker
ea1776f556
Return user ID in use error straight away
2015-04-16 19:56:44 +01:00
Erik Johnston
e1c0970c11
PEP8
2015-04-16 11:18:45 +01:00
Paul "LeoNerd" Evans
f2cf37518b
Filter typing nofication events to only those rooms the requesting user is a member of (SYN-328)
2015-04-15 23:34:16 +01:00
Paul "LeoNerd" Evans
0268d40281
Have TypingNotificationEventSource.get_new_events_for_user() return a deferred, for consistency and extensibility
2015-04-15 23:09:35 +01:00
David Baker
766bd8e880
Dummy login so we can do the first POST request to get login flows without it just succeeding
2015-04-15 17:14:25 +01:00
David Baker
a19b739909
Regstration with email in v2
2015-04-15 15:50:38 +01:00
Erik Johnston
d5ff9effcf
Don't wait on federation_handler.handle_new_event
2015-04-15 15:05:57 +01:00
Erik Johnston
e845434028
Remove run_on_reactor()s
2015-04-15 15:05:45 +01:00
Erik Johnston
bc6cef823f
Do more parellelization for initialSync
2015-04-15 14:21:59 +01:00
Erik Johnston
1ec6fa98c9
Parellelize initial sync
2015-04-15 14:17:16 +01:00
Erik Johnston
a43b40449b
Merge branch 'develop' of github.com:matrix-org/synapse into mysql
2015-04-08 16:46:56 +01:00
Erik Johnston
19234cc6c3
typo
2015-04-08 14:10:06 +01:00
Erik Johnston
e8f1521605
Don't yield on notifying all listeners
2015-04-08 14:08:30 +01:00
Erik Johnston
4fe95094d1
Merge branch 'develop' of github.com:matrix-org/synapse into mysql
2015-04-07 18:05:39 +01:00
David Baker
e9c908ebc0
Completely replace fallback auth for C/S V2:
...
* Now only the auth part goes to fallback, not the whole operation
* Auth fallback is a normal API endpoint, not a static page
* Params like the recaptcha pubkey can just live in the config
Involves a little engineering on JsonResource so its servlets aren't always forced to return JSON. I should document this more, in fact I'll do that now.
2015-04-01 15:05:30 +01:00
Kegan Dougal
813e54bd5b
Fix more AS sender ID thinkos.
...
Specifically, the ASes own user ID wasn't being treated as 'exclusive' so
a human could nab it. Also, the HS would needlessly send user queries to the
AS for its own user ID.
2015-04-01 14:05:24 +01:00
Kegan Dougal
d33ae65efc
Remove more reg/unreg methods. Read config not database for cache.
2015-03-31 11:00:00 +01:00
David Baker
9f642a93ec
pep8
2015-03-31 09:50:44 +01:00
David Baker
59bf16eddc
New registration for C/S API v2. Only ReCAPTCHA working currently.
2015-03-30 18:13:10 +01:00
David Baker
a32e876ef4
Delete pushers when changing password
2015-03-26 13:40:16 +00:00
Kegan Dougal
4edcbcee3b
Merge branch 'develop' into application-services-txn-reliability
...
Conflicts:
synapse/storage/__init__.py
2015-03-26 10:07:59 +00:00
Erik Johnston
0e8f5095c7
Fix unicode database support
2015-03-25 17:15:20 +00:00
Paul "LeoNerd" Evans
ed008e85a8
Reduce activity timer granularity to avoid too many quick updates (SYN-247)
2015-03-23 17:25:50 +00:00
Erik Johnston
9a7f496298
Sanitize RoomMemberStore
2015-03-23 15:29:04 +00:00
David Baker
78adccfaf4
pep8 / pyflakes
2015-03-23 14:23:51 +00:00
David Baker
d98660a60d
Implement password changing (finally) along with a start on making client/server auth more general.
2015-03-23 14:20:28 +00:00
Erik Johnston
278149f533
Sanitize TransactionStore
2015-03-23 13:43:21 +00:00
Erik Johnston
ed4d44d833
Merge pull request #109 from matrix-org/default_registration
...
Disable registration by default. Add script to register new users.
2015-03-18 11:38:52 +00:00
Erik Johnston
f88db7ac0b
Factor out user id validation checks
2015-03-18 11:34:18 +00:00
Erik Johnston
bb24609158
Clean out event_forward_extremities table when the server rejoins the room
2015-03-18 11:19:47 +00:00
Erik Johnston
cd2539ab2a
Merge pull request #110 from matrix-org/fix_ban
...
Fix ban
2015-03-16 15:36:52 +00:00
Kegan Dougal
f0d6f724a2
Set the service ID as soon as it is known.
2015-03-16 15:24:32 +00:00
Erik Johnston
857810d2dd
Revert incorrect changes to where we send events
2015-03-16 15:12:47 +00:00
Erik Johnston
c2c9471cba
Don't block waiting on waking up all the listeners when sending an event.
2015-03-16 13:16:37 +00:00
Erik Johnston
b2e6ee5b43
Remove concept of context.auth_events, instead use context.current_state
2015-03-16 13:06:23 +00:00
Kegan Dougal
835e01fc70
Minor PR comment tweaks.
2015-03-16 10:16:59 +00:00
Kegan Dougal
f9232c7917
Merge branch 'develop' into application-services-txn-reliability
...
Conflicts:
synapse/storage/appservice.py
2015-03-16 10:09:15 +00:00
Erik Johnston
758d114cbc
Send all membership events to the remote homeserver
2015-03-16 00:27:59 +00:00
Paul "LeoNerd" Evans
128cf2daf7
Appease pep8
2015-03-12 16:24:51 +00:00
Paul "LeoNerd" Evans
b0cf867319
Use _ instead of . as a metric namespacing separator, for Prometheus
2015-03-12 16:24:51 +00:00
Paul "LeoNerd" Evans
59c448f074
Add a scalar gauge metric on the size of the presence user cachemap
2015-03-12 16:24:50 +00:00
Kegan Dougal
21fd84dcb8
Use seconds; start gluing in the AS scheduler into the AS handler.
2015-03-09 17:01:19 +00:00
Erik Johnston
8e28db5cc9
Change room handlers get_rooms_for_user to get_joined_rooms_for_user. This uses the a storage api that is cached.
2015-03-09 16:43:09 +00:00
Erik Johnston
9ccccd4874
When setting display name more graciously handle failures to update room state.
2015-03-06 16:24:05 +00:00
Erik Johnston
130df8fb01
Add some randomness to the user specified timeout on event streams to mitigate against thundering herds problems
2015-03-06 10:25:36 +00:00
Kegsay
8ad024ea80
Merge pull request #93 from matrix-org/application-services-exclusive
...
Application services exclusive flag support
2015-03-02 14:56:32 +00:00
Erik Johnston
0a036944bd
Merge branch 'develop' of github.com:matrix-org/synapse into batched_get_pdu
2015-03-02 13:53:30 +00:00
Kegan Dougal
58ff066064
Implement exclusive namespace checks.
2015-02-27 13:51:41 +00:00
Kegan Dougal
dcec7175dc
Finish impl to get new events for AS. ASes should now be able to poll /events
2015-02-26 16:23:01 +00:00
Kegan Dougal
2d20466f9a
Add stub functions and work out execution flow to implement AS event stream polling.
2015-02-25 15:00:59 +00:00
David Baker
443ba4eecc
%s for strings otherwise you end up sending 'u"foo"'
2015-02-24 15:00:12 +00:00
Erik Johnston
e25e0f4da9
Merge branch 'develop' of github.com:matrix-org/synapse into batched_get_pdu
2015-02-23 14:36:00 +00:00
Erik Johnston
db215b7e00
Implement and use new batched get missing pdu
2015-02-23 13:58:02 +00:00
Erik Johnston
2bafeca270
Add missing comma so that it generates a dict and not a set
2015-02-20 14:08:42 +00:00
Erik Johnston
0ac2a79faa
Initial stab at implementing a batched get_missing_pdus request
2015-02-19 17:24:14 +00:00
Erik Johnston
fa6c93bd26
Merge branch 'consumeErrors' of github.com:matrix-org/synapse into develop
2015-02-17 15:18:17 +00:00
Erik Johnston
47281f8fa4
Change some debug logging to info
2015-02-17 13:14:11 +00:00
Erik Johnston
c2b1dbd84c
We do want to consumeError
2015-02-17 11:11:11 +00:00
Erik Johnston
72a4de2ce6
Use consumeErrors=True on all DeferredLists.
...
This is so that the DeferredLists actually consume the error instead of
propogating down the non-existent errback chain. This should reduce the
number of unhandled errors we are seeing.
2015-02-17 10:07:01 +00:00
Erik Johnston
8a59915d7d
Merge branch 'hotfixes-v0.7.0f' of github.com:matrix-org/synapse into develop
2015-02-16 09:47:22 +00:00
Erik Johnston
b99a33f283
resolve_events expect lists, not dicts
2015-02-15 20:20:51 +00:00
Erik Johnston
650dc7f0f9
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-02-13 15:46:42 +00:00
Erik Johnston
b11a6e1c3c
Fix wrong variable name
2015-02-13 15:37:18 +00:00
Mark Haines
0d872f5aa6
Merge pull request #50 from matrix-org/application-services
...
Application Services
2015-02-13 15:06:14 +00:00
Erik Johnston
e441c10a73
pyflakes
2015-02-13 14:23:39 +00:00
Erik Johnston
8c652a2b5f
When we see a difference in current state, actually use state conflict resolution algorithm
2015-02-13 14:20:05 +00:00
Paul "LeoNerd" Evans
93d07c87dc
Reindent code to be less human-readable to keep pep8 from complaining
2015-02-12 19:19:37 +00:00
Paul "LeoNerd" Evans
5f6e6530d0
Appease pyflakes
2015-02-12 19:15:23 +00:00
Paul "LeoNerd" Evans
29805213d1
Can now remove the FIXME too
2015-02-12 19:13:21 +00:00
Paul "LeoNerd" Evans
860b1b4841
Only attempt to fetch presence state of JOINed members in room initialSync (SYN-202)
2015-02-12 19:13:21 +00:00
Erik Johnston
76935078d1
Remove more debug logging
2015-02-11 16:51:22 +00:00
Erik Johnston
ed877d6585
Remove debug logging
2015-02-11 16:50:46 +00:00
Erik Johnston
ddb816cf60
Don't unfreeze when using FreezeEvent.get_dict, as we are using a JSONEncoder that understands FrozenDict
2015-02-11 15:44:28 +00:00
Kegan Dougal
fd40d992ad
PEP8-ify
2015-02-11 10:41:33 +00:00
Kegan Dougal
c7783d6fee
Notify ASes for events sent by other users in a room which an AS user is a part of.
2015-02-11 10:36:08 +00:00
Kegan Dougal
9978c5c103
Merge branch 'develop' into application-services
2015-02-11 10:03:24 +00:00
Mark Haines
84a769cdb7
Fix code-style
2015-02-10 17:58:36 +00:00
Mark Haines
b085fac735
Code-style fixes
2015-02-10 16:30:48 +00:00
Erik Johnston
b90d377af4
Merge branch 'release-v0.6.2' of github.com:matrix-org/synapse into develop
2015-02-10 10:33:35 +00:00
Erik Johnston
d94f682a4c
During room intial sync, only calculate current state once.
2015-02-09 17:41:29 +00:00
Kegan Dougal
53557fc532
Merge branch 'develop' into application-services
2015-02-09 15:20:56 +00:00
Kegan Dougal
f7cac2f7b6
Fix bugs so lazy room joining works as intended.
2015-02-09 15:01:28 +00:00
Kegan Dougal
ac3183caaa
Register a user account for the AS when the AS registers. Add 'sender' column to AS table.
2015-02-09 12:03:37 +00:00
Matthew Hodgson
37b6b880ef
don't give up if we can't create default avatars during tests
2015-02-07 21:24:08 +00:00
Matthew Hodgson
582019f870
...and here's the actual impl. git fail.
2015-02-07 13:32:14 +00:00
Kegan Dougal
73a680b2a8
Add errcodes for appservice registrations.
2015-02-06 17:10:04 +00:00
Mark Haines
20db147ef3
SYN-258: get_recent_events_for_room only accepts stream tokens, convert the topological token to a stream token before passing it to get_recent_events_for_room
2015-02-06 16:01:04 +00:00
Mark Haines
55a186485c
SYN-258: get_recent_events_for_room only accepts stream tokens, convert the topological token to a stream token before passing it to get_recent_events_for_room
2015-02-06 15:58:40 +00:00
Erik Johnston
cc0532a4bf
Explicitly list the RejectedReasons that we can prove
2015-02-06 15:16:26 +00:00
Erik Johnston
e890ce223c
Don't query auth if the only difference is events that were rejected due to auth.
2015-02-06 14:16:50 +00:00
Erik Johnston
c78b5fb1f1
Make seen_ids a set
2015-02-06 13:52:16 +00:00
Kegan Dougal
0995810273
Pyflakes: unused variable.
2015-02-06 11:45:19 +00:00
Kegan Dougal
c3ae8def75
Grant ASes the ability to delete aliases in their own namespace.
2015-02-06 11:32:07 +00:00
Kegan Dougal
e426df8e10
Grant ASes the ability to create alias in their own namespace.
...
Add a new errcode type M_EXCLUSIVE when users try to create aliases inside
AS namespaces, and when ASes try to create aliases outside their own
namespace.
2015-02-06 10:57:14 +00:00
Erik Johnston
3737329d9b
Handle the fact the list.remove raises if element doesn't exist
2015-02-06 10:53:18 +00:00
Kegan Dougal
0227618d3c
Add m.login.application_service registration procedure.
...
This allows known application services to register any user ID under their
own user namespace(s).
2015-02-05 17:29:27 +00:00
Kegan Dougal
11e6b3d18b
Dependency inject ApplicationServiceApi when creating ApplicationServicesHandler.
2015-02-05 17:04:59 +00:00
Kegan Dougal
cab4c73088
Prevent user IDs in AS namespaces being created/deleted by humans.
2015-02-05 16:46:56 +00:00
Kegan Dougal
e9484d6a95
Prevent aliases in AS namespaces being created/deleted by users. Check with ASes when queried for room aliases via federation.
2015-02-05 16:29:56 +00:00
Kegan Dougal
951690e54d
Merge branch 'develop' into application-services
2015-02-05 14:28:03 +00:00
Kegan Dougal
c71456117d
Fix user query checks. HS>AS pushing now works.
2015-02-05 14:17:08 +00:00
Erik Johnston
8f5b858a1b
Merge branch 'develop' of github.com:matrix-org/synapse into federation_client_retries
2015-02-05 13:50:28 +00:00
Erik Johnston
e1515c3e91
Pass through list of room hosts from room alias query to federation so that it can retry against different room hosts
2015-02-05 13:44:42 +00:00
Kegan Dougal
51d63ac329
Glue AS work to general event notifications. Add more exception handling when poking ASes.
2015-02-05 13:19:46 +00:00
Erik Johnston
26a041541b
SYN-202: Log as WARN the 404 'Presence information not visible' errors instead of as ERROR since they were spamming the logs
2015-02-05 13:17:05 +00:00
Kegan Dougal
b932600653
Add unknown room alias check. Call it from directory_handler.get_association
2015-02-05 11:47:11 +00:00
Kegan Dougal
f0c730252f
Add unknown user ID check. Use store.get_aliases_for_room(room_id) when searching for services by alias.
2015-02-05 11:25:32 +00:00
Kegan Dougal
27091f146a
Add hs_token column and generate a different token f.e application service.
2015-02-05 10:08:12 +00:00
Kegan Dougal
a1a4960baf
Impl push_bulk function
2015-02-05 09:43:22 +00:00
Kegan Dougal
96d4bf9012
Modify API for SimpleHttpClient.get_json and update usages.
...
Previously, this would only return the HTTP body as JSON, and discard other
response information (e.g. the HTTP response code). This has now been changed
to throw a CodeMessageException on a non-2xx response, with the response code
and body, which can then be parsed as JSON.
Affected modules include:
- Registration/Login (when using an email for IS auth)
2015-02-04 17:07:31 +00:00
Kegan Dougal
aa8cce58bf
Add query_user/alias APIs.
2015-02-04 16:44:53 +00:00
Erik Johnston
d45e2302ed
Merge branch 'signature_failures' of github.com:matrix-org/synapse into federation_client_retries
2015-02-04 16:30:15 +00:00
Erik Johnston
ae46f10fc5
Apply sanity to the transport client interface. Convert 'make_join' and 'send_join' to accept iterables of destinations
2015-02-04 16:28:12 +00:00
Erik Johnston
95e2d2d36d
When returning lists of servers from alias lookups, put the current server first in the list
2015-02-04 15:02:23 +00:00
Erik Johnston
650e32d455
Change context.auth_events to what the auth_events would be bases on context.current_state, rather than based on the auth_events from the event.
2015-02-04 14:06:46 +00:00
Kegan Dougal
525a218b2b
Begin to add unit tests for appservice glue and regex testing.
2015-02-04 12:24:20 +00:00
Kegan Dougal
17753f0c20
Add stub ApplicationServiceApi and glue it with the handler.
2015-02-04 11:19:18 +00:00
Erik Johnston
c0462dbf15
Rearrange persist_event so that do all the queries that need to be done before returning early if we have already persisted that event.
2015-02-04 10:16:51 +00:00
Erik Johnston
7dd1c5c542
Neaten the handling of state and auth_chain up a bit
2015-02-03 16:12:04 +00:00
Kegan Dougal
94a5db9f4d
Add appservice package and move ApplicationService into it.
2015-02-03 14:44:16 +00:00
Erik Johnston
6efd4d1649
Don't completely die if get auth_chain or querying auth_chain requests fail
2015-02-03 13:57:54 +00:00
Erik Johnston
77a076bd25
Set combinations is | and not +
2015-02-03 13:35:17 +00:00
Kegan Dougal
f2c039bfb9
Implement restricted namespace checks. Begin fleshing out the main hook for notifying application services.
2015-02-03 13:29:27 +00:00
Erik Johnston
fed29251d7
Spelling
2015-02-03 13:23:58 +00:00
Kegan Dougal
a060b47b13
Add namespace constants. Add restrict_to option to limit namespace checks.
2015-02-03 13:17:28 +00:00
Kegan Dougal
197f3ea4ba
Implement regex checks for app services.
...
Expose handler.get_services_for_event which manages the checks for all
services.
2015-02-03 11:26:33 +00:00
Erik Johnston
06c34bfbae
Give exception better message
2015-02-03 11:23:44 +00:00
Erik Johnston
4ff2273b30
Add FIXME note.
2015-02-03 11:23:26 +00:00
Erik Johnston
51969f9e5f
Return rejected events if asked for it over federation.
2015-02-03 10:40:14 +00:00
Erik Johnston
e7ca813dd4
Try to ensure we don't persist an event we have already persisted. In persist_event check if we already have the event, if so then update instead of replacing so that we don't cause a bump of the stream_ordering.
2015-02-03 10:39:41 +00:00
Kegan Dougal
1a2de0c5fe
Implement txns for AS (un)registration.
2015-02-02 17:39:41 +00:00
Kegan Dougal
c059c9fea5
Merge branch 'develop' into application-services
...
Conflicts:
synapse/handlers/__init__.py
synapse/storage/__init__.py
2015-02-02 15:57:59 +00:00
Erik Johnston
4c0da49d7c
Resign events when we return them via /query_auth/
2015-01-30 22:53:13 +00:00
Mark Haines
0b1cc7cc0b
Return empty list rather than None when there are no emphemeral events for a room
2015-01-30 16:56:13 +00:00
Erik Johnston
2cd29dbdd9
Fix bug where accepting invite over federation didn't work. Add logging.
2015-01-30 16:51:58 +00:00
Erik Johnston
7d897f5bfc
Merge pull request #43 from matrix-org/rejections
...
Rejections
2015-01-30 16:11:14 +00:00
Erik Johnston
b724a809c4
Only auth_events with event if event in event.auth_events
2015-01-30 15:57:53 +00:00
Mark Haines
017dfaef4c
Add doc string for __nonzero__ overrides for sync results, raise not implemented if the client attempts to do a gapless sync
2015-01-30 15:52:05 +00:00
Mark Haines
8fe39a0311
Check if the user has joined the room between incremental syncs
2015-01-30 13:38:34 +00:00
Erik Johnston
a70a801184
Fix bug where we superfluously asked for current state. Change API of /query_auth/ so that we don't duplicate events in the response.
2015-01-30 13:34:01 +00:00
Mark Haines
4a67834bc8
Pass client info to the sync_config
2015-01-30 11:50:15 +00:00
Mark Haines
8498d348d8
Fix token formatting
2015-01-30 11:42:09 +00:00
Mark Haines
e97de6d96a
Filter the recent events before applying the limit when doing an initial sync
2015-01-30 11:35:20 +00:00
Mark Haines
22dd1cde2d
Filter the recent events before applying the limit when doing an incremental sync with a gap
2015-01-30 11:32:35 +00:00
Erik Johnston
2ebf795c0a
Merge branch 'develop' of github.com:matrix-org/synapse into rejections
...
Conflicts:
synapse/storage/__init__.py
synapse/storage/schema/delta/v12.sql
2015-01-30 11:10:37 +00:00
Erik Johnston
0c2d245fdf
Update the current state of an event if we update auth events.
2015-01-30 11:08:52 +00:00
Erik Johnston
c1d860870b
Fix regression where we no longer correctly handled the case of gaps in our event graph
2015-01-30 10:48:47 +00:00
Mark Haines
ece828a7b7
Update todo for the filtering on sync
2015-01-29 18:15:24 +00:00
Erik Johnston
78015948a7
Initial implementation of auth conflict resolution
2015-01-29 16:52:33 +00:00
Mark Haines
4ad45f2582
Fix indent
2015-01-29 16:41:49 +00:00
Mark Haines
722b65f461
Move typing notifs to an "emphermal" event list on the room object
2015-01-29 16:41:21 +00:00
Mark Haines
cc42d3f907
Fix check for empty room update
2015-01-29 16:27:38 +00:00
Mark Haines
4d9dd9bdc0
Fix v2 initial sync
2015-01-29 16:23:03 +00:00
Mark Haines
e016f4043b
Use get_room_events_stream to get changes to the rooms if the number of changes is small
2015-01-29 14:40:28 +00:00
Mark Haines
e3e72b8c5c
Remove typing TODO
2015-01-29 03:35:25 +00:00
Mark Haines
3dbce6f4a5
Add typing notifications to sync
2015-01-29 03:33:51 +00:00
Mark Haines
9c61556504
Merge branch 'develop' into client_v2_sync
2015-01-28 17:29:30 +00:00
Mark Haines
26c8fff19e
Merge pull request #36 from matrix-org/device_id_from_access_token
...
Extract the device id and token id from the access token when autheniticating users
2015-01-28 17:19:28 +00:00
Mark Haines
388581e087
Extract the id token of the token when authing users, include the token and device_id in the internal meta data for the event along with the transaction id when sending events
2015-01-28 16:58:23 +00:00
Erik Johnston
0ef5bfd6a9
Start implementing auth conflict res
2015-01-28 16:16:53 +00:00
David Baker
6840e7cece
Merge branch 'master' into develop
2015-01-28 16:03:35 +00:00
David Baker
c291a4d522
Merge branch 'develop' into pushers
...
Conflicts:
synapse/handlers/events.py
synapse/server.py
2015-01-28 12:51:05 +00:00
Kegan Dougal
42876969b9
Add basic application_services SQL, and hook up parts of the appservice store to read from it.
2015-01-28 11:59:38 +00:00
David Baker
273b12729b
Reset badge count to zero when last active time is bumped
2015-01-28 11:55:49 +00:00
David Baker
e32ded7b3e
Add matrix.org as a trusted ID server because it's now passed through on ports 80/443 and the web client defaults to that now. Fixes email validation (including signing up with an email address).
2015-01-28 10:09:54 +00:00
Mark Haines
e020574d65
Fix Formatting
2015-01-27 20:19:36 +00:00
Mark Haines
b19cf6a105
Wait for events if the incremental sync is empty and a timeout is given
2015-01-27 20:09:52 +00:00
Kegan Dougal
fbeaeb8689
Log when ASes are registered/unregistered.
2015-01-27 17:34:40 +00:00
Kegan Dougal
ec3719b583
Use ApplicationService when registering.
2015-01-27 17:15:06 +00:00
Kegan Dougal
92171f9dd1
Add stub methods, TODOs and docstrings for application services.
2015-01-27 16:53:59 +00:00
Mark Haines
a56008842b
Start implementing incremental initial sync
2015-01-27 16:24:22 +00:00
David Baker
f7c4daa8f9
Oops, remove debugging
2015-01-27 16:08:47 +00:00
David Baker
5eacaeb4a7
or of course we could just return the deferred
2015-01-27 16:05:23 +00:00
David Baker
eba89f093f
Need a defer.inlineCallbacks here as we yield in it: otherwise nothing in the cb gets executed.
2015-01-27 16:00:07 +00:00
David Baker
1d77969124
Unbreak bad presence merge - don't add these blocks together with an and: they're different things.
2015-01-27 15:58:27 +00:00
Kegan Dougal
51449e0665
Add appservice handler and store. Glue together rest > handler > store.
2015-01-27 15:50:28 +00:00
Mark Haines
436513068d
Start implementing the non-incremental sync portion of the v2 /sync API
2015-01-26 18:53:31 +00:00
Mark Haines
3186c5bdbc
Merge branch 'develop' into client_v2_sync
2015-01-26 16:32:40 +00:00
Mark Haines
7f6f3f9d62
Pass the current time to serialize event, rather than passing an
...
HS and getting a clock from it and calling time_msec on the clock.
Remove the serialize_event method from the HS since it is no longer
needed.
2015-01-26 16:11:28 +00:00
Mark Haines
0cfb4591a7
Add handler for /sync API
2015-01-26 15:46:31 +00:00
Mark Haines
ada711504e
Replace hs.parse_roomalias with RoomAlias.from_string
2015-01-23 13:21:58 +00:00
Mark Haines
1c06c48ce2
Replace hs.parse_roomid with RoomID.from_string
2015-01-23 11:55:12 +00:00
Mark Haines
5759bec43c
Replace hs.parse_userid with UserID.from_string
2015-01-23 11:47:15 +00:00
David Baker
5c6189ea3e
Merge branch 'develop' into pushers
...
Conflicts:
synapse/rest/__init__.py
2015-01-22 17:46:16 +00:00
Mark Haines
5fed042640
Finish renaming "context" to "room_id" in federation codebase
2015-01-16 19:01:03 +00:00
Mark Haines
2bdee98269
Remove temporary debug logging that was accidentally committed
2015-01-16 19:00:40 +00:00
David Baker
e3e2fc3255
Don't make the pushers' event streams cause people to appear online
2015-01-15 16:17:21 +00:00
Paul "LeoNerd" Evans
c2e7c84e58
Don't try to cancel already-expired timers - SYN-230
2015-01-13 16:58:36 +00:00
Paul "LeoNerd" Evans
02ffbb20d0
Use float rather than integer divisions to turn msec into sec - so timeouts under 1000msec will actually work
2015-01-12 19:09:14 +00:00
Paul "LeoNerd" Evans
67d8305aea
Make typing notification timeouts print a (debug) logging message
2015-01-12 18:22:00 +00:00
Kegan Dougal
b5924cae04
Add raw query param for scrollback.
2015-01-08 14:37:55 +00:00
Kegan Dougal
edb557b2ad
Return the raw federation event rather than adding extra keys for federation data.
2015-01-08 14:28:08 +00:00
Erik Johnston
5940ec993b
Add missing continuation indent.
2015-01-08 13:59:29 +00:00
Kegan Dougal
5720ab59e0
Add 'raw' query parameter to expose the event graph and signatures to savvy clients.
2015-01-08 13:57:40 +00:00
Kegan Dougal
333836ff92
PEP8 and pyflakes warnings
2015-01-07 16:18:12 +00:00
Kegan Dougal
4c68460392
SYN-154: Tweak how the m.room.create check is done.
...
Don't perform the check in auth.is_host_in_room but instead do it in _do_join
and also assert that there are no m.room.members in the room before doing so.
2015-01-07 16:09:00 +00:00
Kegan Dougal
9cb4f75d53
SYN-154: Better error messages when joining an unknown room by ID.
...
The simple fix doesn't work here because room creation also involves
unknown room IDs. The check relies on the presence of m.room.create for
rooms being created, whereas bogus room IDs have no state events at all.
2015-01-07 15:21:48 +00:00
Erik Johnston
9e5545a6fa
RoomsForUser now has sender instead of user_id
2015-01-06 15:53:50 +00:00
Erik Johnston
8a12df8cf3
Merge branch 'erikj-perf' of github.com:matrix-org/synapse into develop
2015-01-06 14:45:57 +00:00
Erik Johnston
76ec154e95
We don't need the full events for get_rooms_for_user_where_membership_is
2015-01-06 14:37:00 +00:00
Mark Haines
5e23a19204
Merge pull request #28 from matrix-org/erikj-perf
...
Database performance improvements.
2015-01-06 13:33:40 +00:00
Mark Haines
adb04b1e57
Update copyright notices
2015-01-06 13:21:39 +00:00
Erik Johnston
f0128f9600
Add RoomMemberStore.get_users_in_room, so that we can get the list of joined users without having to retrieve the full events
2015-01-06 10:55:43 +00:00
Kegan Dougal
67a406a754
Rate limit display names and avatar urls per request rather than per event.
2014-12-19 17:36:33 +00:00
Mark Haines
efd27ff01b
Set a state_key for the topic and room name, otherwise they won't be treated as room state
2014-12-19 15:31:27 +00:00
Mark Haines
f70e622d59
bump_presence_active_time when sending a message event
2014-12-19 14:30:57 +00:00
Mark Haines
a999f0dec3
Don't ratelimit room create events
2014-12-19 14:18:27 +00:00
Mark Haines
1e7f83b91d
Set display name when joining via alias
2014-12-19 12:31:46 +00:00
Mark Haines
5739e6c606
s/user_id/sender/
2014-12-19 11:43:46 +00:00
Mark Haines
041ac476a5
Supply auth_chain along with current state in '/state/', fetch auth events from a remote server if we are missing some of them
2014-12-18 18:47:13 +00:00
Mark Haines
dea5d4b03b
Don't yield on sending the event accross federation.
2014-12-18 11:29:46 +00:00
Erik Johnston
21cab3a7ec
Fix where we pulled in event.state_events from hotfixes branch
2014-12-16 19:16:15 +00:00
Erik Johnston
2215faa361
Merge branch 'hotfixes-v0.5.4a' of github.com:matrix-org/synapse into release-v0.6.0
2014-12-16 19:11:13 +00:00
Erik Johnston
3defd5b3ee
Add FIXME
2014-12-16 19:07:20 +00:00
Erik Johnston
96779d2490
Fix bug where we did not send the full auth chain to people that joined over federation
2014-12-16 18:57:36 +00:00
Erik Johnston
2d7716d4d0
Make error messages slightly more helpful
2014-12-16 18:41:48 +00:00
Mark Haines
56db465047
Merge branch 'release-v0.6.0' into develop
2014-12-16 17:29:49 +00:00
Erik Johnston
f06161a307
Enable rate limiting for all events
2014-12-16 16:10:17 +00:00
Mark Haines
627e4f01d2
Remove send_message since nothing was calling it. Remove Snapshot because only send_message was using it
2014-12-16 16:07:41 +00:00
Mark Haines
c3eae8a88c
Construct the EventContext in the state handler rather than constructing one and then immediately calling state_handler.annotate_context_with_state
2014-12-16 15:59:17 +00:00
Mark Haines
3c7857e49b
clean up coding style a bit
2014-12-16 15:24:03 +00:00
Erik Johnston
3c77d13aa5
Kill off synapse.api.events.*
2014-12-16 11:29:05 +00:00
Erik Johnston
6a1da99fab
Add fixme to raising of AuthError in federation land
2014-12-16 09:35:31 +00:00
Erik Johnston
009e4b5637
User.is_mine is no longer a thing. Use hs.is_mine instead.
2014-12-15 17:17:51 +00:00
Erik Johnston
cf6e5f1dbf
Rename MessageHandler.handle_event. Add a few comments.
2014-12-15 17:01:12 +00:00
Erik Johnston
65cdf4e724
Get current member state from current_state snapshot. Fix leave test.
2014-12-15 15:03:27 +00:00
Erik Johnston
57e0e619f3
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
...
Conflicts:
tests/handlers/test_room.py
2014-12-15 14:45:59 +00:00
Paul "LeoNerd" Evans
20beed9dd4
Still send typing notifications to myself if I'm the only one in the room (it's a lonely life...)
2014-12-15 14:37:12 +00:00
Paul "LeoNerd" Evans
b0bb1756a9
Send list of typing user IDs as 'user_ids' list within 'content', so that m.typing stream events have a toplevel content, for consistency with others
2014-12-12 11:59:46 +00:00
Erik Johnston
63810c777d
Validate message, topic and name event contents
2014-12-12 11:01:09 +00:00
Paul "LeoNerd" Evans
cfb963af03
When users leave rooms mark them as no longer typing in them
2014-12-11 18:33:09 +00:00
Paul "LeoNerd" Evans
f25764943c
Add a 'user_left_room' distributor signal analogous to 'user_joined_room'
2014-12-11 18:27:01 +00:00
Paul "LeoNerd" Evans
5ebc994f84
Actually auth-check to ensure people can only send typing notifications for rooms they're actually in
2014-12-11 18:11:43 +00:00
Paul "LeoNerd" Evans
966c4b2b04
Add a sprinkling of logger.debug() into typing notification handler
2014-12-11 18:00:15 +00:00
Erik Johnston
d3eb12c7b8
Fix federation test
2014-12-11 17:01:27 +00:00
Paul "LeoNerd" Evans
3b2cc26053
Initial hack at unit tests of room typing REST API
2014-12-11 16:03:12 +00:00
Erik Johnston
0b04369238
Fix public room joining by making sure replaces_state never points to itself.
2014-12-11 15:56:06 +00:00
Paul "LeoNerd" Evans
5f49914dee
Avoid cyclic dependency in handler setup
2014-12-10 21:17:48 +00:00
Paul "LeoNerd" Evans
1a75ff5c23
Hook up the event stream to typing notifications
2014-12-10 21:01:49 +00:00
Paul "LeoNerd" Evans
4006d58335
Store serial numbers per room for typing event stream purposes
2014-12-10 20:48:25 +00:00
Paul "LeoNerd" Evans
9eb819e828
First hack at implementing timeouts in typing notification handler
2014-12-10 19:39:01 +00:00
Erik Johnston
4c682143c8
.from_string() no longer takes a HS
2014-12-10 18:00:49 +00:00
Erik Johnston
02e4c18171
Remove dead code
2014-12-10 18:00:36 +00:00
Erik Johnston
b245ee34ed
Add some basic event validation
2014-12-10 17:59:47 +00:00
Erik Johnston
1d2a0040cf
Fix bug where we clobbered old state group values
2014-12-10 15:55:03 +00:00
Erik Johnston
02db7eb209
Fix bug when uploading state with empty state_key
2014-12-10 14:02:48 +00:00
Erik Johnston
aae8a37e63
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
2014-12-10 13:18:40 +00:00
Erik Johnston
02db1fd2e7
Fix AttributeError
2014-12-10 12:00:05 +00:00
Erik Johnston
018443cb59
Make depth increase.
2014-12-10 11:59:53 +00:00
Erik Johnston
95aa903ffa
Try and figure out how and why signatures are being changed.
2014-12-10 11:37:47 +00:00
Erik Johnston
008303b245
PEP8
2014-12-09 14:49:11 +00:00
Erik Johnston
5eca288d28
Fix joining from an invite
2014-12-09 14:47:27 +00:00
Erik Johnston
1c8ee06877
Remove unused snapshot
2014-12-09 10:53:34 +00:00
Erik Johnston
4e57943cc5
Remove unused import
2014-12-09 10:51:36 +00:00
Matthew Hodgson
8529fba02d
fix a million stupid bugs and make it actually work
2014-12-08 19:34:51 +00:00
Erik Johnston
609c31e8df
More bug fixes
2014-12-08 17:50:56 +00:00
Erik Johnston
ee3df06183
More bug fixes
2014-12-08 14:50:48 +00:00
Erik Johnston
e8323b9e34
More bug fixes
2014-12-08 10:16:18 +00:00
Erik Johnston
a295a3c691
Fix registration
2014-12-08 09:24:37 +00:00
Erik Johnston
d044121168
Various typos and bug fixes.
2014-12-08 09:08:26 +00:00
Matthew Hodgson
9c43b258ec
actually reset retry schedule if we can successfuly talk to it
2014-12-08 00:17:12 +00:00
Erik Johnston
6630e1b579
Start making more things use EventContext rather than event.*
2014-12-05 16:20:48 +00:00
Erik Johnston
c5c32266d8
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
2014-12-04 15:58:24 +00:00
Erik Johnston
c31dba86ec
Convert rest and handlers to use new event structure
2014-12-04 15:50:01 +00:00
Erik Johnston
5d7c9ab789
Begin converting things to use the new Event structure
2014-12-04 11:27:59 +00:00
Paul "LeoNerd" Evans
f5d2514fc0
@log_function on PresenceStream's get_new_events_for_user()
2014-12-03 19:48:14 +00:00
Paul "LeoNerd" Evans
52f1d3c886
Store any incoming presence push in the local cache anyway, even if there's no interested observers (yet *hint*) (SYN-115)
2014-12-03 19:06:24 +00:00
Erik Johnston
75b4329aaa
WIP for new way of managing events.
2014-12-03 16:07:21 +00:00
Erik Johnston
6941a19715
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
2014-12-03 11:56:49 +00:00
Paul "LeoNerd" Evans
274d137b00
Extra verbosity on logging of received presence info
2014-12-02 20:51:28 +00:00
Paul "LeoNerd" Evans
307f94dcbe
Squash room_ids list to a set() to remove duplicates - with TODO marker as I have no idea /why/ the dups are happening in the first place
2014-12-02 20:51:12 +00:00
Erik Johnston
9d53228158
Change DomainSpecificString so that it doesn't use a HomeServer object
2014-12-02 10:42:28 +00:00
Erik Johnston
027542e2e5
Fix bugs when joining a remote room that has dodgy event graphs. This should also fix the number of times a HS will trigger a GET /event/
2014-11-27 16:02:26 +00:00
Erik Johnston
0294fba042
on_receive_pdu takes more args
2014-11-27 14:46:33 +00:00
Erik Johnston
07699b5871
Change the way we get missing auth and state events
2014-11-27 14:31:43 +00:00
Erik Johnston
b8849c8cbf
Re-sign events when we return them via federation as a temporary hack to work around the problem where we reconstruct events differently than when they were signed
2014-11-27 13:53:31 +00:00
Erik Johnston
00ab5cd6f2
Attempt to fix bug where we 500d an event stream due to trying to cancel a timer twice
2014-11-26 18:04:33 +00:00
Erik Johnston
858e87ab0d
Add a workaround for bug where some initial join events don't reference creation events in their auth_events
2014-11-26 16:29:03 +00:00
Erik Johnston
6c485c282d
Catch exceptions when trying to add an entry to rooms tables
2014-11-26 16:06:20 +00:00
Erik Johnston
3598c11c8d
Correctly handle the case where we get an event for an unknown room, which turns out we are actually in
2014-11-26 10:41:08 +00:00
Erik Johnston
64fc859dac
Fix bugs in invite/join dances.
...
We now do more implement more of the auth on the events so that we
don't reject valid events.
2014-11-25 17:59:49 +00:00
Erik Johnston
4bd0ab76c6
We don't always want to Auth get_persisted_pdu
2014-11-24 12:56:17 +00:00
Mark Haines
fd40a80a68
Return 404 M_NOT_FOUND when trying to look up a room alias that doesn't exist
2014-11-21 15:11:48 +00:00
Paul "LeoNerd" Evans
5f19c55731
SYN-58: Allow passing explicit limit=0 to initialSync to request no messages at all; missing still implies default 10
2014-11-20 19:33:45 +00:00
Mark Haines
610c2ea131
Fix pep8 and pyflakes warnings
2014-11-20 18:00:10 +00:00
David Baker
f1c7f8e813
Merge branch 'develop' into http_client_refactor
2014-11-20 17:49:48 +00:00
David Baker
e377d33652
Separate out the matrix http client completely because just about all of its code it now separate from the simple case we need for standard HTTP(S)
2014-11-20 17:41:56 +00:00
Mark Haines
db9ce032a4
Fix pep8 codestyle warnings
2014-11-20 17:26:36 +00:00
Mark Haines
32090aee16
Add a few missing yields, Move deferred lists inside PreserveLoggingContext because they don't interact well with the logging contexts
2014-11-20 16:24:00 +00:00
David Baker
20326054da
Oops, I removed this param.
2014-11-20 15:24:38 +00:00
David Baker
dc60eee50e
Refactor the HTTP clients a little.
2014-11-20 13:53:34 +00:00
Mark Haines
dcb99e4972
SYN-153: Fix formatting of federation error message
2014-11-20 09:58:23 +00:00
Erik Johnston
415ddf59bb
Don't add a 'prev' key to m.room.member messages
2014-11-19 17:59:51 +00:00
Paul "LeoNerd" Evans
03dc63f6c8
Initialise UserPresenceCache instances to always contain a 'presence' key
2014-11-19 17:31:46 +00:00
Mark Haines
8993affdc0
SYN-153: Raise 404 if room alias is not found
2014-11-19 17:14:14 +00:00
Mark Haines
97c7c34f6f
Preserve logging context in a few more places, drop the logging context after it has been stashed to reduce potential for confusion
2014-11-19 16:37:43 +00:00
Mark Haines
54c438d8d3
Remove unused variable
2014-11-18 16:46:12 +00:00
Paul "LeoNerd" Evans
75e95c45a2
Rename message handler's new snapshot_room to room_initial_sync() as that better suits its purpose
2014-11-18 16:02:44 +00:00
Paul "LeoNerd" Evans
e9f587ecba
Merge remote-tracking branch 'origin/develop' into room-initial-sync
2014-11-18 15:48:30 +00:00
Mark Haines
b01dd76be1
SYN-149: Enable auth for events added during room creation since they should pass auth checks
2014-11-18 15:42:53 +00:00
Mark Haines
ae9c2ab165
SYN-149: Send join event immediately after the room create event
2014-11-18 15:29:48 +00:00
Paul "LeoNerd" Evans
33d328d967
Include room members' presence in room initialSync
2014-11-18 15:28:58 +00:00
Paul "LeoNerd" Evans
759db7d7d5
Added ability to .get_state() from the PresenceHandler by returning a complete m.presence event
2014-11-18 15:25:55 +00:00
Paul "LeoNerd" Evans
4c18e08036
Don't expect all _user_cachemap entries to definitely contain a "last_active" key
2014-11-18 15:10:11 +00:00
Mark Haines
a5b88c489e
Split out sending the room alias events from creating the alias so that we can do them in the right point when creating a room
2014-11-18 15:03:13 +00:00
Paul "LeoNerd" Evans
17f977a9de
Include 'messages' snapshot in room initialSync
2014-11-18 14:07:51 +00:00
Paul "LeoNerd" Evans
31a049eb69
Merge branch 'develop' into room-initial-sync
...
Conflicts:
synapse/handlers/message.py
2014-11-17 16:59:24 +00:00
Mark Haines
cf45e57d9c
SYN-148: Add the alias after creating the room
2014-11-17 16:37:33 +00:00
Mark Haines
2eaf689f71
These lines aren't doing anything
2014-11-17 10:41:35 +00:00
Mark Haines
cb4b6c844a
Merge PDUs and Events into one object
2014-11-14 21:25:02 +00:00
Mark Haines
8c2b5ea7c4
Fix PDU and event signatures
2014-11-14 19:11:04 +00:00
Mark Haines
de1ec90133
Validate signatures on incoming events
2014-11-14 19:11:04 +00:00
Erik Johnston
b2596c660b
Add a few more comments to the federation handler
2014-11-12 16:20:30 +00:00
Erik Johnston
6fea478d2e
Fix bugs with invites/joins across federatiom.
...
Both in terms of auth and not trying to fetch missing PDUs for invites,
joins etc.
2014-11-12 11:24:11 +00:00
Erik Johnston
61ecb13bf0
PEP8ify
2014-11-11 18:00:13 +00:00
Erik Johnston
37900a92db
Only allow people in a room to look up room state.
2014-11-11 17:55:32 +00:00
Erik Johnston
3db2c0d43e
Rename annotate_state_groups to annotate_event_with_state
2014-11-11 16:58:53 +00:00
Erik Johnston
5ff0bfb81d
Fix bug where we /always/ created a new state group
2014-11-11 14:16:41 +00:00
Paul "LeoNerd" Evans
c23afed39a
Include room membership in room initialSync
2014-11-10 19:34:47 +00:00
Paul "LeoNerd" Evans
1fd8139138
Put room state in room initialSync output - I guess this is right; I really can't find any other tests similar...
2014-11-10 19:29:58 +00:00
Paul "LeoNerd" Evans
269f80bf8e
Have room initialSync return the room's room_id
2014-11-10 19:02:19 +00:00
Erik Johnston
a8e565eca8
Add an EventValidator. Fix bugs in auth ++ storage
2014-11-10 18:25:42 +00:00
Erik Johnston
5d439b127b
PEP8
2014-11-10 13:46:44 +00:00
Erik Johnston
003668cfaa
Add auth to the various server-server APIs
2014-11-10 13:37:24 +00:00
Erik Johnston
6447db063a
Fix backfill to work. Add auth to backfill request
2014-11-10 11:59:51 +00:00
Erik Johnston
65f846ade0
Notify users about invites.
2014-11-10 11:15:02 +00:00
Erik Johnston
07286a73b1
Use current state to get room hosts, rather than querying the database
2014-11-07 16:03:31 +00:00
Erik Johnston
02c3b1c9e2
Add '/event_auth/' federation api
2014-11-07 15:35:53 +00:00
Erik Johnston
d2fb2b8095
Implement invite part of invite join dance
2014-11-07 13:41:00 +00:00
Erik Johnston
3b4dec442d
Return auth chain when handling send_join
2014-11-07 11:22:12 +00:00
Erik Johnston
49948d72f3
Fix joining over federation
2014-11-07 10:53:38 +00:00
Erik Johnston
bf6b72eb55
Start implementing auth chains
2014-11-07 10:53:38 +00:00
Erik Johnston
351c64e99e
Amalgamate all power levels.
...
Remove concept of reqired power levels, something similiar can be done
using the new power level event.
2014-11-06 16:59:13 +00:00
Erik Johnston
233969bb58
Update to use replaces_state rather than prev_state
2014-11-06 15:25:03 +00:00
Erik Johnston
4317c8e583
Implement new replace_state and changed prev_state
...
`prev_state` is now a list of previous state ids, similiar to
prev_events. `replace_state` now points to what we think was replaced.
2014-11-06 15:10:55 +00:00
Erik Johnston
96c001e668
Fix auth checks to all use the given old_event_state
2014-11-05 11:07:54 +00:00
Erik Johnston
dfb3d21a6d
Fix room handler tests
2014-11-04 17:12:39 +00:00
Erik Johnston
da4a09f977
Don't bother locking
2014-11-04 16:51:23 +00:00
Erik Johnston
2a49f177fe
On AuthError, raise a FederationError
2014-11-04 15:10:43 +00:00
Erik Johnston
aa76bf39ab
Remove unused imports
2014-11-04 14:14:02 +00:00
Erik Johnston
ad6eacb3e9
Rename PDU fields to match that of events.
2014-11-03 13:06:58 +00:00
Erik Johnston
7249785bcb
Sign events we create.
2014-11-03 11:33:28 +00:00
Erik Johnston
7a07263281
Merge branch 'develop' of github.com:matrix-org/synapse into federation_authorization
2014-11-03 10:17:37 +00:00
Erik Johnston
1c6825cc7a
Use python logger, not the twisted logger
2014-11-03 10:16:28 +00:00
Erik Johnston
21fe249d62
Actually don't store any PDUs
2014-10-31 10:47:34 +00:00
Erik Johnston
f2de2d644a
Move the impl of backfill to use events.
2014-10-31 09:59:02 +00:00
Erik Johnston
12ce441e67
Convert event ids to be of the form :example.com
2014-10-30 17:00:11 +00:00
Erik Johnston
da511334d2
Make federation return the old current state, so that we can use it to do auth
2014-10-30 11:53:35 +00:00
Erik Johnston
ef9c4476a0
Merge branch 'develop' of github.com:matrix-org/synapse into federation_authorization
2014-10-30 11:18:28 +00:00
Mark Haines
7d709542ca
Fix pep8 warnings
2014-10-30 11:10:17 +00:00
Erik Johnston
e7858b6d7e
Start filling out and using new events tables
2014-10-29 16:59:24 +00:00
Paul "LeoNerd" Evans
b1ee6fd7ed
Fix an off-by-one bug in presence event stream pagination; this might be responsible for any number of bug reports
2014-10-29 16:16:01 +00:00
Paul "LeoNerd" Evans
d6bcffa929
Construct a source-specific 'SourcePaginationConfig' to pass into get_pagination_rows; meaning each source doesn't have to care about its own name any more
2014-10-29 16:16:01 +00:00
Paul "LeoNerd" Evans
c5a25f610a
Remove redundant (and incorrect) presence pagination fetching code
2014-10-29 16:16:01 +00:00
Mark Haines
4841b6d4ba
Remove duplicate join_event from create_room
2014-10-27 16:55:51 +00:00
Erik Johnston
bb4a20174c
Merge branch 'develop' of github.com:matrix-org/synapse into federation_authorization
...
Conflicts:
synapse/federation/transport.py
synapse/handlers/message.py
2014-10-27 10:20:44 +00:00
Mark Haines
4be99c2989
Add get_json method to 3pid http client. Better logging for errors in 3pid requests
2014-10-20 14:10:08 +01:00
Erik Johnston
bf8cdda2f5
It doesn't want a dict
2014-10-17 20:10:34 +01:00
Erik Johnston
b3b1961496
Fix bug where people could join private rooms
2014-10-17 19:37:41 +01:00
Erik Johnston
5ffe5ab43f
Use state groups to get current state. Make join dance actually work.
2014-10-17 18:56:42 +01:00
Mark Haines
456017e0ae
SPEC-7: Don't stamp event contents with 'hsob_ts'
2014-10-17 16:55:55 +01:00
Erik Johnston
f71627567b
Finish implementing the new join dance.
2014-10-17 15:04:17 +01:00
Erik Johnston
1116f5330e
Start implementing the invite/join dance. Continue moving auth to use event.state_events
2014-10-16 16:56:51 +01:00
Erik Johnston
e7bc1291a0
Begin making auth use event.old_state_events
2014-10-15 16:06:59 +01:00
Mark Haines
b9cdc443d7
Fix pyflakes errors
2014-10-02 14:37:30 +01:00
Mark Haines
574377636e
Add a keyword argument to get_json to avoid retrying on DNS failures. Rather than passing MatrixHttpClient.RETRY_DNS_LOOKUP_FAILURES as a fake query string parameter
2014-10-02 14:26:13 +01:00
Mark Haines
4f11518934
Split PlainHttpClient into separate clients for talking to Identity servers and talking to Capatcha servers
2014-10-02 14:03:26 +01:00
Erik Johnston
e06adc6d7e
SYN-2: Allow server admins to delete room aliases
2014-09-30 11:31:42 +01:00
Erik Johnston
3ccb17ce59
SYN-48: Implement WHOIS rest servlet
2014-09-29 14:59:52 +01:00
Erik Johnston
37bfe44046
Merge branch 'deletions' of github.com:matrix-org/synapse into develop
2014-09-25 17:02:53 +01:00
Erik Johnston
1ca51c8586
SYN-46: An invite received from fedearation didn't wake up the event stream for the invited user.
2014-09-25 13:01:05 +01:00
Erik Johnston
72eb360f2d
Don't set the room name to be the room alias on room creation if the client didn't supply a name
2014-09-24 16:59:57 +01:00
Erik Johnston
70899d3ab2
Rename deletions to redactions
2014-09-24 15:27:59 +01:00
Erik Johnston
bc250a6afa
SYN-12: Implement auth for deletion by adding a 'delete_level' on the ops levels event
...
SYN-12 # comment Auth has been added.
2014-09-23 17:36:24 +01:00
Kegan Dougal
0c4ae63ad5
Implemented /rooms/$roomid/state API.
2014-09-23 15:35:58 +01:00
Kegan Dougal
c707b7d128
SYWEB-3 : Added 'visibility' key to rooms returned via /initialSync
2014-09-17 16:09:07 +01:00
Erik Johnston
b6818fd4d2
SYN-40: When a user updates their displayname or avatar update all their join events for all the rooms they are currently in.
2014-09-17 15:05:14 +01:00
Kegan Dougal
cc83b06cd1
Added support for the HS to send emails. Use it to send password resets. Added email_smtp_server and email_from_address config args. Added emailutils.
2014-09-16 12:36:39 +01:00
Kegan Dougal
5f30a69a9e
Added PasswordResetRestServlet. Hit the IS to confirm the email/user. Need to send email.
2014-09-16 11:22:40 +01:00
Erik Johnston
59516a8bb1
Correctly handle receiving 'missing' Pdus from federation, rather than just discarding them.
2014-09-15 16:40:44 +01:00
Erik Johnston
e639a3516d
Improve logging in federation handler.
2014-09-15 16:24:03 +01:00
Kegan Dougal
14bc4ed59f
Merge branch 'develop' of github.com:matrix-org/synapse into registration-api-changes in preparation for re-merge to develop.
2014-09-15 15:27:58 +01:00
Erik Johnston
5bd9369a62
Correctly handle the 'age' key in events and pdus
2014-09-15 13:26:11 +01:00
Kegan Dougal
285ecaacd0
Split out password/captcha/email logic.
2014-09-15 12:42:36 +01:00
Kegan Dougal
76fe7d4eba
Added num_joined_users key to /publicRooms for each room. Show this information in the webclient.
2014-09-08 12:15:29 -07:00
Erik Johnston
768ff1a850
Fix race in presence handler where we evicted things from cache while handling a key therein
2014-09-08 11:28:50 +02:00
Kegan Dougal
1a298aad9c
Added captcha support on both the HS and web client.
...
Merge branch 'captcha' of github.com:matrix-org/synapse into develop
2014-09-05 23:32:51 -07:00
Kegan Dougal
b5749c75d9
Reload captchas when they fail. Cleanup on success.
2014-09-05 23:08:39 -07:00
Kegan Dougal
3ea6f01b4e
80 chars please
2014-09-05 22:55:29 -07:00
Kegan Dougal
37e53513b6
Add config opion for XFF headers when performing ReCaptcha auth.
2014-09-05 22:51:11 -07:00
Kegan Dougal
1829b55bb0
Captchas now work on registration. Missing x-forwarded-for config arg support. Missing reloading a new captcha on the web client / displaying a sensible error message.
2014-09-05 19:18:23 -07:00
Erik Johnston
f47f42090d
Add support for inviting people when you create a room
2014-09-06 01:10:07 +01:00
Erik Johnston
9dd4570b68
Generate m.room.aliases event when the HS creates a room alias
2014-09-05 21:35:56 +01:00
Erik Johnston
95037d8d9d
Change the default power levels to be 0, 50 and 100
2014-09-05 17:13:03 +01:00
Erik Johnston
bcaea74352
Error code must be an integer
2014-09-03 19:19:24 +01:00
Erik Johnston
c9d1ee24ca
Import SynapseError
2014-09-03 19:15:55 +01:00
Erik Johnston
9b18151104
Handle timeouts slightly nicer.
2014-09-03 19:13:41 +01:00
Erik Johnston
5b645f9d34
Don't do auth for change_membership in federation handler, it doesn't work and federation doesn't do auth in general either. Add a hacky timeout when trying to join a remote room.
2014-09-03 19:08:39 +01:00
Erik Johnston
dce6395395
When creating a room and a user supplies a room_alias but no name, use the room_alias as the name.
2014-09-03 18:52:34 +01:00
David Baker
d72ce4da64
Merge branch 'develop' of github.com:matrix-org/synapse into develop
...
Conflicts:
synapse/http/client.py
2014-09-03 18:25:17 +01:00
David Baker
d6ecbbdf0a
Add support for registering with a threepid to the HS (get credentials from the client and check them against an ID server).
2014-09-03 18:22:27 +01:00
Matthew Hodgson
8a7c1d6a00
fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org hasn't been incorporated in time for launch.
2014-09-03 17:31:57 +01:00
Erik Johnston
30bcbc433a
Fix up directory server to not require uploading room hosts. Update the room hosts table with the current room hosts (if we have them) on GET.
2014-09-03 16:04:27 +01:00
Erik Johnston
e4c40158c5
Snapshot prev_state for generic events
2014-09-03 15:48:51 +01:00
Paul "LeoNerd" Evans
cda31fb755
Kill the state
...
... key from all the Presence messages
2014-09-03 15:37:10 +01:00
Paul "LeoNerd" Evans
dada11dc5f
Bugfix for back-pagination of presence
2014-09-03 15:28:03 +01:00
Kegan Dougal
7fc84c7019
Make retrying requests on DNS failures configurable, and turn off retrying only in directory.get_association
2014-09-03 14:26:52 +01:00
Paul "LeoNerd" Evans
da31b96b55
Implement presence state visibilty limiting when polling eventsource for stream
2014-09-03 13:46:52 +01:00
Kegan Dougal
c54d8df504
Update API docs to use 'presence' key not 'state'. Fixed error messages when setting presence.
2014-09-03 11:45:30 +01:00
Kegan Dougal
65693e9e15
Fixed GET /events/$id to be not broken.
2014-09-03 11:24:45 +01:00
Paul "LeoNerd" Evans
da3e04df8b
Rename the 'do_users_share_a_room' to something slightly less verb-sounding
2014-09-03 10:40:48 +01:00
Paul "LeoNerd" Evans
ddf3ca7ab3
Neater is_presence_visible() code
2014-09-03 10:40:21 +01:00
Mark Haines
c6eafdfbaf
Add copyright notices and fix pyflakes errors
2014-09-03 09:43:11 +01:00
Mark Haines
112c7ea315
Set status message for ratelimit error responses
2014-09-03 09:37:44 +01:00
Mark Haines
30ad0c5674
Merge branch 'ratelimiting' into develop
2014-09-03 09:15:52 +01:00
Mark Haines
683596f91e
Raise LimitExceedError when the ratelimiting is throttling requests
2014-09-03 08:58:48 +01:00
Mark Haines
780548b577
rate limiting for message sending
2014-09-02 18:22:15 +01:00
Mark Haines
c7a7cdf734
Add ratelimiting function to basehandler
2014-09-02 17:57:04 +01:00
Paul "LeoNerd" Evans
d9d6fbb085
Safer handling of incoming presence EDUs that may or maynot contain 'presence' or 'state'
2014-09-02 11:17:43 +01:00
Paul "LeoNerd" Evans
7b56a7a3cb
'continue' to go to the next item in a for loop, not 'break'
2014-09-02 11:15:46 +01:00
Erik Johnston
10e7821461
By default, only room ops can change the name and topic.
2014-09-02 11:11:47 +01:00
Erik Johnston
ed25abe05f
Add message to assertion
2014-09-02 10:58:33 +01:00
Erik Johnston
040d985908
Add support for setting room name and topic when creating rooms
2014-09-02 10:02:14 +01:00
Paul "LeoNerd" Evans
270d302834
Reënable presence visibility permission checking now it's not used on redundant code paths
2014-09-01 22:15:02 +01:00
Paul "LeoNerd" Evans
32fdf8efd6
No need to test is_presence_visible in _start_polling_local because we know it will be by when it's called
2014-09-01 22:15:02 +01:00
Erik Johnston
48142a01dd
Don't set a 'default' key in the creation event
2014-09-01 20:39:43 +01:00
Erik Johnston
6d28560626
Don't put required power levels on permission state events
2014-09-01 20:27:45 +01:00
Erik Johnston
b8ab9f1c0a
Add all the necessary checks to make banning work.
2014-09-01 18:24:56 +01:00
Erik Johnston
3faa2ae78c
Merge branch 'develop' of github.com:matrix-org/synapse into room_config
2014-09-01 18:21:29 +01:00
Paul "LeoNerd" Evans
1c6ab2d759
Bump a user's presence last_active time every time they send a message to a room
2014-09-01 16:16:35 +01:00
Erik Johnston
db7109c43b
Add beginnings of ban support.
2014-09-01 16:15:34 +01:00
Paul "LeoNerd" Evans
fd696f1243
Perform room unit tests with 'local' users actually in the right domain ;)
2014-09-01 15:58:30 +01:00
Paul "LeoNerd" Evans
468d94c920
Rename API-visible 'mtime' presence field to 'last_active'; slightly different semantics
2014-09-01 15:39:50 +01:00
Paul "LeoNerd" Evans
02f4e3b3ff
Rename 'state' presence key to the much more obvious 'presence'; maintain a legacy 'state' copy for now
2014-09-01 14:45:41 +01:00
Erik Johnston
865469f233
Implement power level lists, default power levels and send_evnet_level/add_state_level events.
2014-09-01 14:39:09 +01:00
Erik Johnston
10efca1a74
Merge branch 'develop' of github.com:matrix-org/synapse into room_config
2014-09-01 13:41:44 +01:00
Paul "LeoNerd" Evans
93407cf7cf
Bugfixes on presence pushes on user joining:
...
* No need to inform clients of status of remote users; as that will
arrive in due course anyway. We don't -have- the state currently, so
we'd only send an unknown message
* Remember to bump the presence serial for the event source, so the
notifiers will wake up and report it
2014-08-29 19:53:33 +01:00
Paul "LeoNerd" Evans
a8e8d1d06c
Renamed get_current_token_part to get_current_key
2014-08-29 19:15:23 +01:00
Paul "LeoNerd" Evans
eec67a675f
Have EventSource's get_new_events_for_user() API work only on keys within that source, not overall eventstream tokens
2014-08-29 19:13:55 +01:00
Paul "LeoNerd" Evans
6797c7f1b1
TypingNotificationEventSource has to return proper tokens, not int 0
2014-08-29 19:00:55 +01:00
Paul "LeoNerd" Evans
4bfdec1eb2
Rename 'events_key' to 'room_key' so it matches the name of the event source
2014-08-29 19:00:55 +01:00
Paul "LeoNerd" Evans
6dd50da54e
Define a new event stream data source for typing notifications (currently null)
2014-08-29 17:39:33 +01:00
Paul "LeoNerd" Evans
20d0db6cfb
Move the *EventSource classes into the handlers they relate to, so it's easier to find the code
2014-08-29 17:10:28 +01:00
Erik Johnston
8e2d4c6da5
Merge branch 'develop' of github.com:matrix-org/synapse into room_config
2014-08-29 14:22:04 +01:00
Erik Johnston
ee06023573
Get the equalities right.
2014-08-29 13:28:06 +01:00
Erik Johnston
47fb286184
Merge branch 'presence_logging' into develop
2014-08-29 12:10:00 +01:00
Erik Johnston
5dd38d579b
Fix a couple of bugs in presence handler related to pushing updatesto the correct user. Fix presence tests.
2014-08-29 12:08:33 +01:00
Erik Johnston
8113eb7c79
Turn of trace_function logging
2014-08-28 18:45:00 +01:00
Erik Johnston
aaf4fd98ee
Only poll remote users if they are in our presence list, rather than in a common room
2014-08-28 18:43:03 +01:00
Mark Haines
722c19d033
Fix FederationHandler to event.origin
2014-08-28 18:32:44 +01:00
Erik Johnston
1b7686329e
Don't query the rooms members table so much by using the new notifier api that allows you to specify room_ids to notify.
2014-08-28 17:43:15 +01:00
Erik Johnston
54d0a75573
Merge branch 'develop' of github.com:matrix-org/synapse into presence_logging
...
Conflicts:
synapse/handlers/presence.py
2014-08-28 16:52:46 +01:00
Erik Johnston
a8d318cf82
Up timeout to 10 minutes
2014-08-28 16:44:09 +01:00
Paul "LeoNerd" Evans
efc5f3440d
Only send presence "poll"/"unpoll" EDUs when changing from/to zero remotes
2014-08-28 16:43:55 +01:00
Paul "LeoNerd" Evans
c46c806126
Re-enable presence, un-skip presence tests
2014-08-28 16:00:14 +01:00
Erik Johnston
eb3094ed31
And more logging.
2014-08-28 15:58:38 +01:00
Mark Haines
7b079a26a5
Remove get_state_for_room function from federation handler
2014-08-28 15:32:38 +01:00
Erik Johnston
e0ba81344c
Add more logging. Up the event stream timer to 10s
2014-08-28 15:30:42 +01:00
Erik Johnston
b8b52ca09d
Add logging to try and figure out what is going on with the presence stuff
2014-08-28 14:58:51 +01:00
Mark Haines
7acede1e42
Fix pyflakes warnings
2014-08-28 13:51:50 +01:00
Mark Haines
15ab5f5ad8
Merge backfill_ and backfill in federation handler
2014-08-28 13:45:35 +01:00
Erik Johnston
b485d622cc
Fix bug where we used UserID objects instead of strigns
2014-08-28 13:40:27 +01:00
Erik Johnston
d2bc5d6f29
Create the correct events with the right configuration when creating a new room.
2014-08-28 10:59:15 +01:00
Erik Johnston
c2b4b73751
Split out MessageHandler
2014-08-27 17:59:36 +01:00
Mark Haines
357dd1871d
Merge branch 'develop' into storage_transactions
...
Conflicts:
tests/handlers/test_federation.py
tests/handlers/test_room.py
2014-08-27 17:28:55 +01:00
Mark Haines
2aeaa7b77c
Merge branch 'develop' into storage_transactions
...
Conflicts:
synapse/handlers/room.py
synapse/storage/stream.py
2014-08-27 17:15:58 +01:00
Mark Haines
1d95e78759
Merge branch 'develop' into storage_transactions
2014-08-27 16:54:12 +01:00
Mark Haines
b30358f439
add _get_room_member, fix datastore methods
2014-08-27 16:51:54 +01:00
Erik Johnston
52cb5e6324
Remove stale FIXMEs
2014-08-27 16:44:29 +01:00
Erik Johnston
8af5e360d6
Remove store_id from notifier.on_new_room_event calls.
2014-08-27 16:23:33 +01:00
Erik Johnston
7917ff1271
Turn off presence again.
2014-08-27 16:09:48 +01:00
Erik Johnston
bfe9faad5a
Index sources in a nicer fashion.
2014-08-27 15:33:52 +01:00
Erik Johnston
05672a6a8c
Convert get_paginat_rows to use PaginationConfig. This allows people to supply directions.
2014-08-27 15:25:27 +01:00
Mark Haines
a0d1f5a014
Start updating state handling to use snapshots
2014-08-27 15:11:51 +01:00
Mark Haines
a03c7f27a8
Fill out prev_events before calling persist_event
2014-08-27 14:32:19 +01:00
Erik Johnston
77a255c7c3
PEP8 tweaks.
2014-08-27 14:19:39 +01:00
Erik Johnston
47519cd8c2
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
...
Conflicts:
synapse/handlers/events.py
synapse/rest/events.py
synapse/rest/room.py
2014-08-27 14:13:06 +01:00
Erik Johnston
bd16b93e8f
Implement presence event source. Change the way the notifier indexes listeners
2014-08-27 14:03:27 +01:00
Paul "LeoNerd" Evans
5eff05a4ce
Initial typing notification support - EDU federation, but no timers, and no actual push to clients
2014-08-27 11:45:16 +01:00
Mark Haines
bf05218c4b
Merge branch 'develop' into storage_transactions
2014-08-27 11:19:37 +01:00
Kegan Dougal
c65885e166
Added support for GET /events/$eventid with auth checks.
2014-08-27 10:33:01 +01:00
Mark Haines
d2798de660
Fold federation/handler into handlers/federation
2014-08-26 19:49:42 +01:00
Erik Johnston
67c5f89244
Enable presence again. Fix up api to match old api.
2014-08-26 19:40:29 +01:00
Erik Johnston
3a2a5b959c
WIP: Completely change how event streaming and pagination work. This reflects the change in the underlying storage model.
2014-08-26 18:57:46 +01:00
Mark Haines
a498df0428
Move new event boilerplate in room handlers into a method on a base clase.
2014-08-26 18:49:51 +01:00
Erik Johnston
9a93e83d90
Respect 'limit' param in initialSync api
2014-08-26 16:26:30 +01:00
Mark Haines
47c1a3d454
Merge branch 'develop' into storage_transactions
2014-08-26 16:15:49 +01:00
Mark Haines
3281fec07a
Use state_key rather than target_user_id
2014-08-26 16:14:54 +01:00
Mark Haines
a29d12a18a
Use state_key rather than target_user_id
2014-08-26 16:13:32 +01:00
Mark Haines
4b63b06cad
Merge branch 'develop' into storage_transactions
...
Conflicts:
synapse/api/auth.py
synapse/handlers/room.py
synapse/storage/__init__.py
2014-08-26 16:07:05 +01:00
Mark Haines
ac21dfff6d
Fix pyflakes errors
2014-08-26 16:02:59 +01:00
Mark Haines
32347bfcc9
fix a few pyflakes errors
2014-08-26 16:01:29 +01:00
Erik Johnston
a664ec20e0
Add a do_users_share_a_room method and use that in the presence handler.
2014-08-26 13:38:26 +01:00
Kegan Dougal
47c3a089c5
Merge branch 'develop' of github.com:matrix-org/synapse into client_server_url_rename
2014-08-26 09:26:33 +01:00
Kegan Dougal
cab3095803
Removed member list servlet: now using generic state paths.
2014-08-26 09:26:07 +01:00
Erik Johnston
cda4ff8519
Oops, we need to use defer.returnValue.
2014-08-22 18:23:02 +01:00
Erik Johnston
5b058a79cb
Make is_presence_visible always return true as it was thrashing the database.
2014-08-22 18:21:21 +01:00
Erik Johnston
b18db63c06
Turn off more spammy logging.
2014-08-22 18:13:50 +01:00
Erik Johnston
9f514915af
Add indices to schema
2014-08-22 18:03:39 +01:00
Mark Haines
1379dcae6f
Take a snapshot of the state of the room before performing updates
2014-08-22 17:00:10 +01:00
Erik Johnston
e7ee0b9fc1
Change IM sync api to also return the current presence list.
2014-08-21 16:40:21 +01:00
Erik Johnston
3d1cae0e79
In the initial sync api, return the inviter for rooms in the 'invited' state
2014-08-21 15:07:08 +01:00
Erik Johnston
c6950b18cc
Return the current state in the initial sync api.
2014-08-21 15:06:22 +01:00
Erik Johnston
1587ea26fe
Wait for getting a Join in response to an invite/join dance.
2014-08-21 14:38:22 +01:00
Paul "LeoNerd" Evans
583add34fe
Use the "collect_presencelike_data" distributor signal instead of re-implementing its behaviour
2014-08-20 16:06:47 +01:00
Paul "LeoNerd" Evans
50718825bd
Fix exception name in _fill_out_join_content() exception
2014-08-20 16:06:47 +01:00
Paul "LeoNerd" Evans
9c0e570496
Kill the "_homeserver_" injected messages for room membership changes
2014-08-20 16:06:47 +01:00
Erik Johnston
5ef0948eaa
Better handle the edge cases of trying to remote join rooms
2014-08-20 14:42:47 +01:00
Erik Johnston
849627b82e
Don't generate room membership messages. Include previous state of in membership messages.
2014-08-20 11:53:57 +01:00
Erik Johnston
e2b861cc67
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
2014-08-19 16:41:13 +01:00
Erik Johnston
5c00614aab
PresenceStreamData was expecting *_key to be ints
2014-08-19 15:51:10 +01:00
Paul "LeoNerd" Evans
89cabba3e0
Don't delete OFFLINE users from the presence cache, so we can report on their offline mtime
2014-08-19 14:51:15 +01:00
Erik Johnston
347242a5c4
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
...
Conflicts:
tests/rest/test_presence.py
tests/rest/test_rooms.py
tests/utils.py
2014-08-19 14:48:19 +01:00
Erik Johnston
234128586b
Print out stacktrace when we failed to persist event.
2014-08-19 14:30:28 +01:00
Erik Johnston
75b6d982a0
Add a 'backfill room' button
2014-08-19 14:20:03 +01:00
Erik Johnston
598a1d8ff9
Change the way pagination works to support out of order events.
2014-08-19 14:19:48 +01:00
Paul "LeoNerd" Evans
88f7482b92
Perform the 'REST'-level tests of Presence against the real Presence handler as well, mocking out the datastore beneath it
2014-08-19 11:16:23 +01:00
Paul "LeoNerd" Evans
83f031207e
Implement and test presence dropping of remote users
2014-08-19 11:16:23 +01:00
Erik Johnston
1422a22970
Fix typos in SQL and where we still had rowid's (which no longer exist)
2014-08-18 16:25:18 +01:00
Erik Johnston
4eb8f84aa8
Make snapshot_all_rooms return results in the correct form, including start and end tokens.
2014-08-18 16:20:21 +01:00
Erik Johnston
b4a1f2ccb5
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
2014-08-18 15:53:40 +01:00
Paul "LeoNerd" Evans
faf25e3a83
Allow room presence visibility between users who share a room
2014-08-18 13:41:43 +01:00
Erik Johnston
1c2caacd67
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
2014-08-18 11:14:57 +01:00
Erik Johnston
dccb2f57be
Disable the ability to GET individualy messages. We need to think about the correct API to do this, as the current one doesn't make much sense.
2014-08-18 10:59:04 +01:00
Matthew Hodgson
98ed3d0222
improve comment
2014-08-16 01:52:03 +01:00
Matthew Hodgson
fc846aa771
emergency bodges to turn off presence ACLs in order to make
...
matrix.org:8080 actually work
2014-08-16 01:47:17 +01:00
Erik Johnston
7f5c7ddea9
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
2014-08-15 17:50:27 +01:00
Paul "LeoNerd" Evans
9c41f635a9
When starting to poll for presence, also include members of all shared rooms
2014-08-15 17:12:07 +01:00
Erik Johnston
6efc688917
Fix typo of key name
2014-08-15 16:47:26 +01:00
Erik Johnston
d260a42ca2
PEP8 cleanups
2014-08-15 16:17:36 +01:00
Erik Johnston
8d1f763209
Fix pagination to work with new db schema
2014-08-15 15:53:06 +01:00
Erik Johnston
01f089d9fb
Correctly return new token when returning events. Serialize events correctly.
2014-08-15 15:28:54 +01:00
Erik Johnston
114984a236
Start chagning the events stream to work with the new DB schema
2014-08-15 13:58:28 +01:00
Erik Johnston
d72f897f07
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
...
Conflicts:
synapse/storage/stream.py
2014-08-15 11:50:14 +01:00
Erik Johnston
5002efa31b
Reimplement the get public rooms api to work with new DB schema
2014-08-15 10:26:35 +01:00
Erik Johnston
2c46bb6208
Fix up typos and correct sql queries
2014-08-14 18:40:50 +01:00
Erik Johnston
661c711765
Start fixing places that use the data store.
2014-08-14 17:34:37 +01:00
Kegan Dougal
fef3183461
Pass back the user_id in the response to /login in case it has changed. Store and use that on the webclient rather than the input field.
2014-08-14 16:40:15 +01:00
Kegan Dougal
ca3747fb2f
hs: Make /login accept full user IDs or just local parts. webclient: Only enable Register button when both password fields match.
2014-08-14 16:29:51 +01:00
Paul "LeoNerd" Evans
53147e5ae4
Reflect user's messages up to themselves before pushing it to federatoin; also release roomlock before touching federation so we don't halt progress on the world
2014-08-14 16:22:08 +01:00
Kegan Dougal
5a5f37ca17
Send forbidden codes when doing login attempts.
2014-08-14 14:29:06 +01:00
Paul "LeoNerd" Evans
0fa05ea331
Round Presence mtime and mtime_age to nearest msec; avoids floats for msec values over the wire
2014-08-14 14:16:01 +01:00
Kegan Dougal
c75add6ec8
Added a urls module for keeping client and federation prefixes.
2014-08-14 11:52:56 +01:00
Paul "LeoNerd" Evans
d05aa651f8
An initial hack at storing presence state-change mtimes in database and presenting age durations to clients/federation events
2014-08-13 19:19:15 +01:00
Paul "LeoNerd" Evans
3a1cfe18cf
Implement directory service federation by Federation Queries; avoid local_only hack; add unit tests
2014-08-13 18:03:41 +01:00
Paul "LeoNerd" Evans
80c056c148
Now that HS->HS Profile lookups use Federation Queries, we don't need the 'local_only' antirecursion hack
2014-08-13 17:23:49 +01:00
Paul "LeoNerd" Evans
505917cb97
Use new Federation Query API to implement HS->HS fetching of remote users' profile information instead of (ab)using the client-side REST API
2014-08-13 17:23:49 +01:00
Matthew Hodgson
f98e6380f1
add in whitespace after copyright statements to improve legibility
2014-08-13 03:14:34 +01:00
matrix.org
4f475c7697
Reference Matrix Home Server
2014-08-12 15:10:52 +01:00