Negar Fazeli
6e7dc7c7dd
Fix a bug caused by a change in auth_handler function
...
Fix the relevant unit test cases
2016-06-08 23:22:39 +02:00
Mark Haines
56d15a0530
Store the typing users as user_id strings. ( #819 )
...
Rather than storing them as UserID objects.
2016-06-02 16:28:54 +01:00
Mark Haines
70599ce925
Allow external processes to mark a user as syncing. ( #812 )
...
* Add infrastructure to the presence handler to track sync requests in external processes
* Expire stale entries for dead external processes
* Add an http endpoint for making users as syncing
Add some docstrings and comments.
* Fixes
2016-06-02 15:20:15 +01:00
Mark Haines
c626fc576a
Move the AS handler out of the Handlers object.
...
Access it directly from the homeserver itself. It already wasn't
inheriting from BaseHandler storing it on the Handlers object was
already somewhat dubious.
2016-05-31 13:53:48 +01:00
Negi Fazeli
6fe04ffef2
Fix set profile error with Requester.
...
Replace flush_user with delete access token due to function removal
Add a new test case for if the user is already registered
2016-05-23 19:50:28 +02:00
Mark Haines
0cb441fedd
Move typing handler out of the Handlers object
2016-05-17 15:58:46 +01:00
Mark Haines
821306120a
Replaces calls to fetch_room_distributions_into with get_joined_hosts_for_room
2016-05-16 19:48:07 +01:00
Negi Fazeli
40aa6e8349
Create user with expiry
...
- Add unittests for client, api and handler
Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
2016-05-13 15:34:15 +02:00
Daniel Wagner-Hall
b4022cc487
Pass whole requester to ratelimiting
...
This will enable more detailed decisions
2016-03-03 16:43:42 +00:00
Mark Haines
700487a7c7
Fix flake8 warnings for tests
2016-02-19 15:34:38 +00:00
Erik Johnston
929cb0ed7d
Don't set currently_active for remote presence
2016-02-19 10:58:27 +00:00
Erik Johnston
b4796a62ee
Add unit test
2016-02-18 11:52:33 +00:00
Erik Johnston
9da9826b85
Remove old tests.
2016-02-18 10:46:16 +00:00
Erik Johnston
2c176e02ae
Make unit tests work
2016-01-18 14:48:50 +00:00
Daniel Wagner-Hall
ac5a4477ad
Require unbanning before other membership changes
2016-01-15 16:27:26 +00:00
Mark Haines
c0a279e808
Delete the table objects from TransactionStore
2016-01-13 11:15:20 +00:00
David Baker
c232780081
Merge pull request #456 from matrix-org/store_event_actions
...
Send unread notification counts
2016-01-08 14:47:15 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
David Baker
0e48f7f245
fix tests
2016-01-06 16:46:41 +00:00
David Baker
92a1e74b20
fix tests
2016-01-04 14:17:35 +00:00
David Baker
d79e90f078
Add mocks to make tests work again
2015-12-22 17:56:56 +00:00
Mark Haines
7b593af7e1
rename the method in the tests as well
2015-12-01 16:06:17 +00:00
Erik Johnston
bd3de8f39a
Update tests
2015-11-17 18:38:48 +00:00
Daniel Wagner-Hall
ca2f90742d
Open up /events to anonymous users for room events only
...
Squash-merge of PR #345 from daniel/anonymousevents
2015-11-05 14:32:26 +00:00
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
Daniel Wagner-Hall
70e265e695
Re-add whitespace around caveat operators
2015-08-19 14:30:31 +01:00
Daniel Wagner-Hall
ce832c38d4
Remove padding space around caveat operators
2015-08-18 17:39:26 +01:00
Daniel Wagner-Hall
42e858daeb
Fix units in test
...
I made the non-test seconds instead of ms, but not the test
2015-08-18 17:38:37 +01:00
Daniel Wagner-Hall
3e6fdfda00
Fix some formatting to use tuples
2015-08-18 15:18:50 +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
bd1236c0ee
Consolidate duplicate code in notifier
2015-07-02 11:46:05 +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
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
Mark Haines
17167898c8
Fix the presence tests
2015-05-22 16:22:54 +01:00
Mark Haines
8eca5bd50a
Fix the presence tests
2015-05-20 13:22:18 +01:00
Mark Haines
0b0033c40b
Merge branch 'develop' into notifier_performance
2015-05-18 13:50:01 +01:00
Mark Haines
c5d1b4986b
Remove unused arguments and doc PresenceHandler.push_update_to_clients
2015-05-14 14:59:31 +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
6f8e2d517e
Merge branch 'develop' of github.com:matrix-org/synapse into postgres
2015-04-27 14:41:40 +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
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
Erik Johnston
6ba2e3df4e
Merge branch 'develop' of github.com:matrix-org/synapse into postgres
2015-04-17 11:22:31 +01:00
Paul "LeoNerd" Evans
04c7f3576e
Various minor fixes to unit-test structure around typing notifications
2015-04-15 23:32:11 +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
Erik Johnston
4fe95094d1
Merge branch 'develop' of github.com:matrix-org/synapse into mysql
2015-04-07 18:05:39 +01:00
Erik Johnston
9236136f3a
Make work in both Maria and SQLite. Fix tests
2015-04-01 14:12:33 +01: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
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
6d74e46621
Fix tests
2015-03-09 17:01:11 +00:00
Erik Johnston
852816befe
Fix presence tests
2015-02-23 15:14:09 +00:00
Kegan Dougal
f2fdcb7c4b
Merge branch 'develop' into application-services
2015-02-11 16:43:26 +00:00
Mark Haines
896253e085
Factor out some of the common homeserver setup code into a
...
setup_test_homeserver function in utils.
2015-02-11 11:37:30 +00:00
Kegan Dougal
11e6b3d18b
Dependency inject ApplicationServiceApi when creating ApplicationServicesHandler.
2015-02-05 17:04:59 +00:00
Kegan Dougal
951690e54d
Merge branch 'develop' into application-services
2015-02-05 14:28:03 +00:00
Kegan Dougal
131e036402
Fix unit tests.
2015-02-05 13:22:20 +00:00
Kegan Dougal
bc658907f0
Add unit test for appservice_handler.query_room_alias_exists
2015-02-05 11:54:36 +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
89f2e8fbdf
Fix bug in store defer. Add more unit tests.
2015-02-04 15:21:03 +00:00
Kegan Dougal
525a218b2b
Begin to add unit tests for appservice glue and regex testing.
2015-02-04 12:24:20 +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
Erik Johnston
78015948a7
Initial implementation of auth conflict resolution
2015-01-29 16:52:33 +00:00
Mark Haines
ada711504e
Replace hs.parse_roomalias with RoomAlias.from_string
2015-01-23 13:21:58 +00:00
Mark Haines
5759bec43c
Replace hs.parse_userid with UserID.from_string
2015-01-23 11:47:15 +00:00
Paul "LeoNerd" Evans
3a243c53f4
Rename MockedDatastoreTestCase to MockedDatastorePresenceTestCase since it is still presence-specific
2015-01-22 20:06:28 +00:00
Paul "LeoNerd" Evans
cbb10879cb
Much merging of test case setUp() methods to make them much more
...
shareable
2015-01-22 20:06:28 +00:00
Paul "LeoNerd" Evans
73315ce9de
Abstract out the room ID from presence tests, so it's stored in self
2015-01-21 20:01:57 +00:00
Paul "LeoNerd" Evans
dbe71e670c
Use common base class for two Presence unit-tests, avoiding boilerplate copypasta
2015-01-21 16:58:16 +00:00
Mark Haines
5fed042640
Finish renaming "context" to "room_id" in federation codebase
2015-01-16 19:01:03 +00:00
Paul "LeoNerd" Evans
968dc988f9
Check that setting typing notification still works after explicit timeout - SYN-230
2015-01-12 18:01:49 +00:00
Kegan Dougal
4640239d34
Mock ratelimiter to make tests pass.
2014-12-19 17:49:47 +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
Erik Johnston
3c77d13aa5
Kill off synapse.api.events.*
2014-12-16 11:29:05 +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
Erik Johnston
ebf2ec3ce6
Fix membership handler test
2014-12-12 14:32:44 +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
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
Erik Johnston
d3eb12c7b8
Fix federation test
2014-12-11 17:01:27 +00:00
Erik Johnston
c161b6cf96
Fix room creation test
2014-12-11 16:43:30 +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
4d6af0dde3
Fix some tests
2014-12-10 18:00:57 +00:00
Erik Johnston
08aceea82e
Add newline back in
2014-12-10 10:26:12 +00:00
Erik Johnston
f26ec14b21
Remove whitespace
2014-12-10 10:25:21 +00:00
Matthew Hodgson
8ada2d2018
fix UTs by telling all the mock stores about the new methods for tracking retries
2014-12-09 23:53:07 +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
822b15ea43
Fix tests.
2014-11-26 10:45:37 +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
Paul "LeoNerd" Evans
03dc63f6c8
Initialise UserPresenceCache instances to always contain a 'presence' key
2014-11-19 17:31:46 +00:00
Mark Haines
c5eabe3143
replace user_id with sender
2014-11-19 16:38:40 +00:00
Mark Haines
cb4b6c844a
Merge PDUs and Events into one object
2014-11-14 21:25:02 +00:00
Mark Haines
de1ec90133
Validate signatures on incoming events
2014-11-14 19:11:04 +00:00
Mark Haines
8d8a133c89
SYN-103: Remove "origin" and "destination" keys from edus
2014-11-13 15:49:03 +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
3db2c0d43e
Rename annotate_state_groups to annotate_event_with_state
2014-11-11 16:58:53 +00:00