summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-16 11:24:10 +0000
committerDavid Baker <dave@matrix.org>2015-01-16 11:24:10 +0000
commit2d2953cf5fce26625e56fc1abc230735d007ea1e (patch)
treef792d8e4067d5edf43e5bed876fe5d4ee11d8a51 /synapse/storage
parentSend room name and first alias in notification poke. (diff)
downloadsynapse-2d2953cf5fce26625e56fc1abc230735d007ea1e.tar.xz
Require device language when adding a pusher.
Because this seems like it might be useful to do sooner rather
than later.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/pusher.py3
-rw-r--r--synapse/storage/schema/delta/v10.sql1
-rw-r--r--synapse/storage/schema/pusher.sql1
3 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/pusher.py b/synapse/storage/pusher.py
index bfc4980256..4eb30c7bdf 100644
--- a/synapse/storage/pusher.py
+++ b/synapse/storage/pusher.py
@@ -94,7 +94,7 @@ class PusherStore(SQLBaseStore):
     @defer.inlineCallbacks
     def add_pusher(self, user_name, kind, app_id,
                    app_display_name, device_display_name,
-                   pushkey, pushkey_ts, data):
+                   pushkey, pushkey_ts, lang, data):
         try:
             yield self._simple_upsert(
                 PushersTable.table_name,
@@ -108,6 +108,7 @@ class PusherStore(SQLBaseStore):
                     app_display_name=app_display_name,
                     device_display_name=device_display_name,
                     ts=pushkey_ts,
+                    lang=lang,
                     data=data
                 ))
         except Exception as e:
diff --git a/synapse/storage/schema/delta/v10.sql b/synapse/storage/schema/delta/v10.sql
index a991e4eb11..689d2dff8b 100644
--- a/synapse/storage/schema/delta/v10.sql
+++ b/synapse/storage/schema/delta/v10.sql
@@ -22,6 +22,7 @@ CREATE TABLE IF NOT EXISTS pushers (
   device_display_name varchar(128) NOT NULL,
   pushkey blob NOT NULL,
   ts BIGINT NOT NULL,
+  lang varchar(8),
   data blob,
   last_token TEXT,
   last_success BIGINT,
diff --git a/synapse/storage/schema/pusher.sql b/synapse/storage/schema/pusher.sql
index a991e4eb11..689d2dff8b 100644
--- a/synapse/storage/schema/pusher.sql
+++ b/synapse/storage/schema/pusher.sql
@@ -22,6 +22,7 @@ CREATE TABLE IF NOT EXISTS pushers (
   device_display_name varchar(128) NOT NULL,
   pushkey blob NOT NULL,
   ts BIGINT NOT NULL,
+  lang varchar(8),
   data blob,
   last_token TEXT,
   last_success BIGINT,