Add new API appservice specific public room list #1676
Conversation
2be6a5d
to
f32fb65
Compare
def edit_published_appservice_room_list(self, appservice_id, network_id, | ||
room_id, visibility): | ||
"""Edit the appservice/network specific public room list. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have some docstring for the parameters here?
@defer.inlineCallbacks | ||
def set_room_is_public_appservice(self, room_id, appservice_id, network_id, | ||
is_public): | ||
"""Edit the appservice/network specific public room list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have docstring for what the params are and what this does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
room_id TEXT NOT NULL | ||
); | ||
|
||
CREATE UNIQUE INDEX appservice_room_list_idx ON appservice_room_list( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add comment on what this table is for?
appservice and network id to use an appservice specific one. | ||
Setting to None returns all public rooms across all lists. | ||
""" | ||
if search_filter or network_tuple is not (None, None): | ||
# We explicitly don't bother caching searches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the comment need updating if we aren't caching the appservice lists as well?
What is an appservice_id look like ooi? |
e.g. |
Now with added sytests matrix-org/sytest#328! |
Is it really |
Woops, looks like its |
Will probably change it to |
This is for setting the publicity of a room that is bridged to a 3rd party network. This change reflects the second bullet point of matrix-org/synapse#1676 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
08ce1f2
to
2bf5a47
Compare
@matrixbot retest this please |
As per matrix-org/synapse#1676 The existing local config system still exists and is used for remote home server directories (since /thirdparty/protocols doesn't support listing remote home servers, and also because people are using it).
As per matrix-org/synapse#1676 The existing local config system still exists and is used for remote home server directories (since /thirdparty/protocols doesn't support listing remote home servers, and also because people are using it).
This adds the following:
instance_id
field to each instance in theGET /thirdparty/protocols
APIPUT /directory/list/appservice/$network_id/$room_id
POST /publicRooms
,third_party_instance_id
which returns rooms published to AS instance specific lists, andinclude_all_networks
which if true returns all rooms that have been published to any list. By default it will only return rooms on the main, default list.https://docs.google.com/document/d/12mVuOT7Qoa49L_PQAPjavoK9c2nalYEFOHxJOmH5j-w/edit?usp=sharing