Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add new API appservice specific public room list #1676

Merged
merged 7 commits into from Dec 12, 2016

Conversation

Projects
None yet
3 participants
Owner

erikjohnston commented Dec 6, 2016 edited

This adds the following:

  • A instance_id field to each instance in the GET /thirdparty/protocols API
  • An API that allows ASes to publish rooms to their own dedicated lists, PUT /directory/list/appservice/$network_id/$room_id
  • Two extra params to POST /publicRooms, third_party_instance_id which returns rooms published to AS instance specific lists, and include_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

erikjohnston added some commits Dec 6, 2016

synapse/handlers/directory.py
+ def edit_published_appservice_room_list(self, appservice_id, network_id,
+ room_id, visibility):
+ """Edit the appservice/network specific public room list.
+ """
@NegativeMjark

NegativeMjark Dec 6, 2016

Contributor

Could we have some docstring for the parameters here?

synapse/storage/room.py
+ @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.
@NegativeMjark

NegativeMjark Dec 6, 2016

Contributor

Could we have docstring for what the params are and what this does?

+ room_id TEXT NOT NULL
+);
+
+CREATE UNIQUE INDEX appservice_room_list_idx ON appservice_room_list(
@NegativeMjark

NegativeMjark Dec 6, 2016

Contributor

Maybe add comment on what this table is for?

synapse/handlers/room_list.py
+ 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.
@NegativeMjark

NegativeMjark Dec 6, 2016

Contributor

Does the comment need updating if we aren't caching the appservice lists as well?

Contributor

NegativeMjark commented Dec 6, 2016

What is an appservice_id look like ooi?

Owner

erikjohnston commented Dec 6, 2016

What is an appservice_id look like ooi?

e.g. irc-freenode or 9666621b268e14d7b18b110073f07c6e955c60a8c8a5792fd810e9978d1931d7

@erikjohnston erikjohnston referenced this pull request in matrix-org/sytest Dec 7, 2016

Merged

Test AS specific room lists #328

Owner

erikjohnston commented Dec 7, 2016

Now with added sytests matrix-org/sytest#328!

Contributor

lukebarnard1 commented Dec 12, 2016

Is it really instance_id? Because I can't see any sign of that in the code...

Owner

erikjohnston commented Dec 12, 2016

Will probably change it to network_id in the AS layer, and instance_id in the client layer, if that sounds good to you @lukebarnard1 ?

lukebarnard1 added a commit to matrix-org/matrix-js-sdk that referenced this pull request Dec 12, 2016

Add setRoomDirectoryVisibilityAppService
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).

erikjohnston added some commits Dec 12, 2016

Owner

erikjohnston commented Dec 12, 2016

@matrixbot retest this please

@erikjohnston erikjohnston merged commit 1574b83 into develop Dec 12, 2016

7 of 8 checks passed

Sytest Dendron (Commit) Build #1242 origin/erikj/room_list failed in 1 min 8 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #2083 origin/erikj/room_list succeeded in 7 min 5 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #2126 origin/erikj/room_list succeeded in 6 min 40 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

dbkr added a commit to vector-im/riot-web that referenced this pull request Dec 14, 2016

Support room dir 3rd party network filtering
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).

@dbkr dbkr referenced this pull request in vector-im/riot-web Dec 14, 2016

Merged

Support room dir 3rd party network filtering #2747

Half-Shot added a commit to Half-Shot/vector-web that referenced this pull request Feb 9, 2017

Support room dir 3rd party network filtering
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).

@erikjohnston erikjohnston referenced this pull request in matrix-org/matrix-doc Mar 29, 2017

Open

Spec per AS publicRooms list #869

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment