diff options
author | Erik Johnston <erik@matrix.org> | 2018-11-27 11:22:49 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-02-13 20:54:34 +0000 |
commit | 8d316f0060ac1db90dabbd5019b35eb8a4941eab (patch) | |
tree | 4ea08ca7cc665db9495b0cf9b564fb09d535f0ad | |
parent | Strip signatures and hashes on outgoing events (diff) | |
download | synapse-8d316f0060ac1db90dabbd5019b35eb8a4941eab.tar.xz |
Reduce event ID size
-rw-r--r-- | synapse/events/builder.py | 2 | ||||
-rw-r--r-- | synapse/federation/units.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/synapse/events/builder.py b/synapse/events/builder.py index e662eaef10..03ea2ef14f 100644 --- a/synapse/events/builder.py +++ b/synapse/events/builder.py @@ -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) diff --git a/synapse/federation/units.py b/synapse/federation/units.py index d278475d9a..bfd07e6615 100644 --- a/synapse/federation/units.py +++ b/synapse/federation/units.py @@ -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 |