1
0

Reduce event ID size

This commit is contained in:
Erik Johnston
2018-11-27 11:22:49 +00:00
committed by Brendan Abolivier
parent b8deaa077e
commit 8d316f0060
2 changed files with 3 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ class EventBuilderFactory(object):
i = str(self.event_id_count)
self.event_id_count += 1
local_part = str(int(self.clock.time())) + i + random_string(5)
local_part = random_string(3) + str(i)
e_id = EventID(local_part, self.hostname)

View File

@@ -132,6 +132,8 @@ def _mangle_pdu(pdu_json):
pdu_json["auth_events"] = list(_strip_hashes(pdu_json["auth_events"]))
pdu_json["prev_events"] = list(_strip_hashes(pdu_json["prev_events"]))
logger.info("Mangled PDU: %s", pdu_json)
return pdu_json