diff options
author | David Baker <dave@matrix.org> | 2015-12-10 16:26:08 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-12-10 16:26:08 +0000 |
commit | 21f135ba763a583ecf9ba2714b5151f6b14b61fd (patch) | |
tree | b7d2caeff94eb20bd167df49d0694e8f4168e65c /synapse/handlers/_base.py | |
parent | Merge pull request #432 from matrix-org/pushrules_refactor (diff) | |
download | synapse-21f135ba763a583ecf9ba2714b5151f6b14b61fd.tar.xz |
Very first cut of calculating actions for events as they come in. Doesn't store them yet. Not very efficient.
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index 5fd20285d2..a8e8c4f5af 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -19,9 +19,12 @@ from synapse.api.errors import LimitExceededError, SynapseError, AuthError from synapse.crypto.event_signing import add_hashes_and_signatures from synapse.api.constants import Membership, EventTypes from synapse.types import UserID, RoomAlias +from synapse.push.action_generator import ActionGenerator from synapse.util.logcontext import PreserveLoggingContext +from synapse.events.utils import serialize_event + import logging @@ -264,6 +267,11 @@ class BaseHandler(object): event, context=context ) + action_generator = ActionGenerator(self.store) + yield action_generator.handle_event(serialize_event( + event, self.clock.time_msec() + )) + destinations = set(extra_destinations) for k, s in context.current_state.items(): try: |