summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-01-30 16:11:14 +0000
committerErik Johnston <erik@matrix.org>2015-01-30 16:11:14 +0000
commit7d897f5bfc4bbb65aa9ab4fb8e601511633baf2c (patch)
treeccb776c4531d442f5c8c7629528d6e085bb45464 /synapse/storage
parentAllow any greater version for webclient (diff)
parentBriefly doc structure of query_auth API. (diff)
downloadsynapse-7d897f5bfc4bbb65aa9ab4fb8e601511633baf2c.tar.xz
Merge pull request #43 from matrix-org/rejections
Rejections
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/rejections.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/synapse/storage/rejections.py b/synapse/storage/rejections.py
index 7d38b31f44..4e1a9a2783 100644
--- a/synapse/storage/rejections.py
+++ b/synapse/storage/rejections.py
@@ -28,6 +28,16 @@ class RejectionsStore(SQLBaseStore):
             values={
                 "event_id": event_id,
                 "reason": reason,
-                "last_failure": self._clock.time_msec(),
+                "last_check": self._clock.time_msec(),
             }
         )
+
+    def get_rejection_reason(self, event_id):
+        return self._simple_select_one_onecol(
+            table="rejections",
+            retcol="reason",
+            keyvalues={
+                "event_id": event_id,
+            },
+            allow_none=True,
+        )