diff options
author | Erik Johnston <erikj@jki.re> | 2016-12-12 17:00:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 17:00:10 +0000 |
commit | 1574b839e02a38434371d1cd97559102319cf206 (patch) | |
tree | 2dae67cf8872c2231d4f140b8517e37308a19f9f /synapse/appservice/api.py | |
parent | Merge pull request #1694 from matrix-org/rav/no_get_e2e_keys (diff) | |
parent | Rename network_id to instance_id on client side (diff) | |
download | synapse-1574b839e02a38434371d1cd97559102319cf206.tar.xz |
Merge pull request #1676 from matrix-org/erikj/room_list
Add new API appservice specific public room list
Diffstat (limited to 'synapse/appservice/api.py')
-rw-r--r-- | synapse/appservice/api.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py index b0eb0c6d9d..6893610e71 100644 --- a/synapse/appservice/api.py +++ b/synapse/appservice/api.py @@ -19,6 +19,7 @@ from synapse.api.errors import CodeMessageException from synapse.http.client import SimpleHttpClient from synapse.events.utils import serialize_event from synapse.util.caches.response_cache import ResponseCache +from synapse.types import ThirdPartyInstanceID import logging import urllib @@ -177,6 +178,13 @@ class ApplicationServiceApi(SimpleHttpClient): " valid result", uri) defer.returnValue(None) + for instance in info.get("instances", []): + network_id = instance.get("network_id", None) + if network_id is not None: + instance["instance_id"] = ThirdPartyInstanceID( + service.id, network_id, + ).to_string() + defer.returnValue(info) except Exception as ex: logger.warning("query_3pe_protocol to %s threw exception %s", |