summary refs log tree commit diff
path: root/synapse/storage/appservice.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-03-06 17:27:55 +0000
committerKegan Dougal <kegan@matrix.org>2015-03-06 17:27:55 +0000
commit4a6afa6abf6c90c393bc3fa00e40d3927fc0c6c1 (patch)
treeb2d213eba05188c4bd7928c4383fd6fb0bf48f11 /synapse/storage/appservice.py
parentAdd appservice txns sql schema (diff)
downloadsynapse-4a6afa6abf6c90c393bc3fa00e40d3927fc0c6c1.tar.xz
Assign the AS ID from the database; replace old placeholder txn id.
Diffstat (limited to 'synapse/storage/appservice.py')
-rw-r--r--synapse/storage/appservice.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/appservice.py b/synapse/storage/appservice.py
index eec8fbd592..582269b8d5 100644
--- a/synapse/storage/appservice.py
+++ b/synapse/storage/appservice.py
@@ -302,6 +302,7 @@ class ApplicationServiceStore(SQLBaseStore):
             if as_token not in services:
                 # add the service
                 services[as_token] = {
+                    "id": res["as_id"],
                     "url": res["url"],
                     "token": as_token,
                     "hs_token": res["hs_token"],
@@ -326,7 +327,6 @@ class ApplicationServiceStore(SQLBaseStore):
             except JSONDecodeError:
                 logger.error("Bad regex object '%s'", res["regex"])
 
-        # TODO get last successful txn id f.e. service
         for service in services.values():
             logger.info("Found application service: %s", service)
             self.services_cache.append(ApplicationService(
@@ -334,7 +334,8 @@ class ApplicationServiceStore(SQLBaseStore):
                 url=service["url"],
                 namespaces=service["namespaces"],
                 hs_token=service["hs_token"],
-                sender=service["sender"]
+                sender=service["sender"],
+                id=service["id"]
             ))