summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-01-28 16:16:53 +0000
committerErik Johnston <erik@matrix.org>2015-01-28 16:16:53 +0000
commit0ef5bfd6a9eaaae14e199997658b3d0006abd854 (patch)
tree5c0a35bbe563e860673e3fb771306d48bce6392a /synapse/storage
parentMake it the responsibility of the replication layer to check signature and ha... (diff)
downloadsynapse-0ef5bfd6a9eaaae14e199997658b3d0006abd854.tar.xz
Start implementing auth conflict res
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/rejections.py10
-rw-r--r--synapse/storage/schema/im.sql1
2 files changed, 11 insertions, 0 deletions
diff --git a/synapse/storage/rejections.py b/synapse/storage/rejections.py

index 7d38b31f44..b7249700d7 100644 --- a/synapse/storage/rejections.py +++ b/synapse/storage/rejections.py
@@ -31,3 +31,13 @@ class RejectionsStore(SQLBaseStore): "last_failure": self._clock.time_msec(), } ) + + def get_rejection_reason(self, event_id): + self._simple_select_one_onecol( + table="rejections", + retcol="reason", + keyvalues={ + "event_id": event_id, + }, + allow_none=True, + ) diff --git a/synapse/storage/schema/im.sql b/synapse/storage/schema/im.sql
index bc7c6b6ed5..5866a387f6 100644 --- a/synapse/storage/schema/im.sql +++ b/synapse/storage/schema/im.sql
@@ -128,5 +128,6 @@ CREATE TABLE IF NOT EXISTS rejections( event_id TEXT NOT NULL, reason TEXT NOT NULL, last_check TEXT NOT NULL, + root_rejected TEXT, CONSTRAINT ev_id UNIQUE (event_id) ON CONFLICT REPLACE );