summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-23 15:01:05 +0000
committerErik Johnston <erik@matrix.org>2016-03-23 15:04:11 +0000
commitf96526ffc23fdd99ab47abda67fb579a1ad764f9 (patch)
treeb3a31c89f53fbd72131cf1f6f7cae66720a57472 /synapse/events
parentIntern type and state_key on events (diff)
downloadsynapse-f96526ffc23fdd99ab47abda67fb579a1ad764f9.tar.xz
Intern sender, event_id and room_id in events
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 2ceac19adb..63004eaf04 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -146,6 +146,11 @@ class FrozenEvent(EventBase):
         event_dict["type"] = intern_string(event_dict["type"])
         if "state_key" in event_dict:
             event_dict["state_key"] = intern_string(event_dict["state_key"])
+        if "sender" in event_dict:
+            event_dict["sender"] = intern_string(event_dict["sender"])
+
+        event_dict["event_id"] = intern(event_dict["event_id"].encode('ascii'))
+        event_dict["room_id"] = intern(event_dict["room_id"].encode('ascii'))
 
         if USE_FROZEN_DICTS:
             frozen_dict = freeze(event_dict)