diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-25 17:26:32 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-25 19:06:05 +0000 |
commit | 1b988b051b203ec17352b7422be141e622b4fa42 (patch) | |
tree | 7eaaba5ab32b20819185f35f1c57dbdead2ea477 /synapse/storage | |
parent | Indirect invalidations of _get_event_cache via a helper method to keep all us... (diff) | |
download | synapse-1b988b051b203ec17352b7422be141e622b4fa42.tar.xz |
Store the rejected reason in (Frozen)Event structs
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/_base.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 374db1a304..7f5ad9b0fb 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -784,6 +784,7 @@ class SQLBaseStore(object): txn, internal_metadata, js, redacted, check_redacted=check_redacted, get_prev_content=get_prev_content, + rejected_reason=rejected_reason, ) cache[(check_redacted, get_prev_content, allow_rejected)] = result return result @@ -791,7 +792,8 @@ class SQLBaseStore(object): return None def _get_event_from_row_txn(self, txn, internal_metadata, js, redacted, - check_redacted=True, get_prev_content=False): + check_redacted=True, get_prev_content=False, + rejected_reason=None): start_time = time.time() * 1000 @@ -806,7 +808,11 @@ class SQLBaseStore(object): internal_metadata = json.loads(internal_metadata) start_time = update_counter("decode_internal", start_time) - ev = FrozenEvent(d, internal_metadata_dict=internal_metadata) + ev = FrozenEvent( + d, + internal_metadata_dict=internal_metadata, + rejected_reason=rejected_reason, + ) start_time = update_counter("build_frozen_event", start_time) if check_redacted and redacted: |