mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Very first cut of calculating actions for events as they come in. Doesn't store them yet. Not very efficient.
This commit is contained in:
parent
86345a511f
commit
21f135ba76
4 changed files with 81 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue