summary refs log tree commit diff
path: root/synapse/events/__init__.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-04-08 16:50:27 +0100
committerMark Haines <mjark@negativecurvature.net>2015-04-08 16:50:27 +0100
commit83f5125d528d3aba47b2f261666e507a04715fa9 (patch)
treed7129ae37cfafb0a1b6dc276a4fbd63056a1d4a7 /synapse/events/__init__.py
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
parentAppease pep8 (diff)
downloadsynapse-83f5125d528d3aba47b2f261666e507a04715fa9.tar.xz
Merge pull request #114 from matrix-org/improve_get_event_cache
Improve get event cache
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r--synapse/events/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 64e08223b0..e4495ccf12 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -46,9 +46,10 @@ def _event_dict_property(key):
 
 class EventBase(object):
     def __init__(self, event_dict, signatures={}, unsigned={},
-                 internal_metadata_dict={}):
+                 internal_metadata_dict={}, rejected_reason=None):
         self.signatures = signatures
         self.unsigned = unsigned
+        self.rejected_reason = rejected_reason
 
         self._event_dict = event_dict
 
@@ -109,7 +110,7 @@ class EventBase(object):
 
 
 class FrozenEvent(EventBase):
-    def __init__(self, event_dict, internal_metadata_dict={}):
+    def __init__(self, event_dict, internal_metadata_dict={}, rejected_reason=None):
         event_dict = dict(event_dict)
 
         # Signatures is a dict of dicts, and this is faster than doing a
@@ -128,6 +129,7 @@ class FrozenEvent(EventBase):
             signatures=signatures,
             unsigned=unsigned,
             internal_metadata_dict=internal_metadata_dict,
+            rejected_reason=rejected_reason,
         )
 
     @staticmethod