summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/__init__.py8
-rw-r--r--synapse/events/builder.py5
2 files changed, 8 insertions, 5 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 6a05ba2d16..58edf2bc8f 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -85,10 +85,10 @@ class EventBase(object):
         return hasattr(self, "state_key")
 
     def get_dict(self):
-        d = dict(self._original)
+        d = dict(self._event_dict)
         d.update({
-            "signatures": self._signatures,
-            "unsigned": self._unsigned,
+            "signatures": self.signatures,
+            "unsigned": self.unsigned,
         })
 
         return d
@@ -128,7 +128,7 @@ class FrozenEvent(EventBase):
     @staticmethod
     def from_event(event):
         e = FrozenEvent(
-            event.event_dict()
+            event.get_pdu_json()
         )
 
         e.internal_metadata = event.internal_metadata
diff --git a/synapse/events/builder.py b/synapse/events/builder.py
index 39b4d2a2ab..0b8caf9318 100644
--- a/synapse/events/builder.py
+++ b/synapse/events/builder.py
@@ -22,10 +22,13 @@ from synapse.util.stringutils import random_string
 
 class EventBuilder(EventBase):
     def __init__(self, key_values={}):
-        super(FrozenEvent, self).__init__(
+        super(EventBuilder, self).__init__(
             key_values,
         )
 
+    def update_event_key(self, key, value):
+        self._event_dict[key] = value
+
     def update_event_keys(self, other_dict):
         self._event_dict.update(other_dict)