mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Add new API appservice specific public room list
This commit is contained in:
parent
194b6259c5
commit
f32fb65552
14 changed files with 371 additions and 40 deletions
|
@ -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,14 @@ class ApplicationServiceApi(SimpleHttpClient):
|
|||
" valid result", uri)
|
||||
defer.returnValue(None)
|
||||
|
||||
for instance in info.get("instances", []):
|
||||
instance["appservice_id"] = service.id
|
||||
network_id = instance.get("network_id", None)
|
||||
if network_id is not None:
|
||||
instance["network_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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue