Save event actions to the db

This commit is contained in:
David Baker 2015-12-10 17:51:15 +00:00
parent a84a693327
commit aa667ee396
4 changed files with 72 additions and 2 deletions

View file

@ -19,7 +19,6 @@ import push_rule_evaluator
import logging
logger = logging.getLogger(__name__)
@ -42,6 +41,9 @@ class ActionGenerator:
evaluator = yield push_rule_evaluator.\
evaluator_for_user_name_and_profile_tag(
uid, None, event['room_id'], self.store
)
)
actions = yield evaluator.actions_for_event(event)
logger.info("actions for user %s: %s", uid, actions)
self.store.set_actions_for_event(
event['event_id'], uid, None, actions
)