Commit Graph

54 Commits (872cf4351698e9723edd5b58c436087be2986a32)

Author SHA1 Message Date
Richard van der Hoff 8810685df9 Stub out ServerNoticesSender on the workers
... and have the sync endpoints call it directly rather than obsure indirection
via PresenceHandler
2018-05-22 11:54:51 +01:00
Erik Johnston bed10f9880 Use state handler instead of get_users_in_room/get_joined_hosts 2016-08-26 14:54:30 +01:00
Mark Haines 3b86ecfa79 Move the presence handler out of the Handlers object 2016-05-16 18:56:37 +01:00
Mark Haines 673c96ce97 Remove dead code left over from presence changes 2016-03-17 11:03:47 +00:00
Erik Johnston e5999bfb1a Initial cut 2016-02-17 15:40:50 +00:00
Erik Johnston 2c1fbea531 Fix up logcontexts 2016-02-08 14:26:45 +00:00
Daniel Wagner-Hall d83d004ccd Fix flake8 warnings for new flake8 2016-02-02 17:18:50 +00:00
Erik Johnston 0e07f2e15d Only fetch events for rooms and receipts 2016-01-21 16:10:37 +00:00
Daniel Wagner-Hall da417aa56d Allow non-guests to peek on rooms using /events 2016-01-20 15:34:07 +00:00
Erik Johnston fd5c28dc52 Dont fire user_joined_room when guest hits /events
Firing the 'user_joined_room' signal everytime a guest hits /events
causes all presence for that room to be returned in the stream. This may
sound helpful, but causes clients to tightloop calling /events.

In general, guest users should get the initial presence from (room)
intial sync and so we don't require presence to sbsequently come down
the event stream.
2016-01-12 11:04:06 +00:00
Matthew Hodgson 6c28ac260c copyrights 2016-01-07 04:26:29 +00:00
Mark Haines dbe7892e03 Fix a race between started/stopped stream 2015-12-14 15:09:41 +00:00
Mark Haines a9526831a4 Wrap calls to distributor.fire in appropriately named functions so that static analysis can work out want is calling what 2015-12-01 20:53:04 +00:00
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 192241cf2a Remove unused arguments and code 2015-11-02 15:10:59 +00: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 f8f3d72e2b Don't make pushers handle presence/typing events 2015-08-24 16:19:43 +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 476899295f Change the way we do logging contexts so that they survive divergences 2015-05-08 16:32:18 +01: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 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
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 c291a4d522 Merge branch 'develop' into pushers
Conflicts:
	synapse/handlers/events.py
	synapse/server.py
2015-01-28 12:51:05 +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
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 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 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
Kegan Dougal edb557b2ad Return the raw federation event rather than adding extra keys for federation data. 2015-01-08 14:28:08 +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
Mark Haines adb04b1e57 Update copyright notices 2015-01-06 13:21:39 +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
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
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
Erik Johnston 5bd9369a62 Correctly handle the 'age' key in events and pdus 2014-09-15 13:26:11 +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
Kegan Dougal 65693e9e15 Fixed GET /events/$id to be not broken. 2014-09-03 11:24:45 +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 a8d318cf82 Up timeout to 10 minutes 2014-08-28 16:44:09 +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
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
Kegan Dougal c65885e166 Added support for GET /events/$eventid with auth checks. 2014-08-27 10:33:01 +01:00
Erik Johnston 67c5f89244 Enable presence again. Fix up api to match old api. 2014-08-26 19:40:29 +01:00