summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-22 19:32:17 +0000
committerDavid Baker <dave@matrix.org>2015-01-22 19:32:17 +0000
commit8a850573c9cf50dd83ba47c033b28fe2bbbaf9d4 (patch)
tree2d61c19377aebe7d855061dde7bb91fc154a0e63 /synapse/storage
parentoops, this is not its own schema file (diff)
downloadsynapse-8a850573c9cf50dd83ba47c033b28fe2bbbaf9d4.tar.xz
As yet fairly untested GET API for push rules
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/push_rule.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index dbbb35b2ab..d087257ffc 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -29,11 +29,11 @@ class PushRuleStore(SQLBaseStore):
     @defer.inlineCallbacks
     def get_push_rules_for_user_name(self, user_name):
         sql = (
-            "SELECT "+",".join(PushRuleTable.fields)+
-            "FROM pushers "
-            "WHERE user_name = ?"
+            "SELECT "+",".join(PushRuleTable.fields)+" "
+            "FROM "+PushRuleTable.table_name+" "
+            "WHERE user_name = ? "
+            "ORDER BY priority_class DESC, priority DESC"
         )
-
         rows = yield self._execute(None, sql, user_name)
 
         dicts = []