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 room membership APIs #1680

Merged
merged 3 commits into from Dec 9, 2016

Conversation

Projects
None yet
4 participants
Owner

erikjohnston commented Dec 8, 2016 edited

Add two new APIs:

  • /joined_rooms that returns the list of rooms the user is in
  • /room/<room_id>/joined_members that returns the list of currently joined users and their profile data

These are primarily designed for ASes that may want to efficiently look up those pieces of information without otherwise needing to do a full /sync


Example output:

GET /joined_rooms

{"joined_rooms": ["!foo:example.com"]}
GET /room/!foo:example.com/joined_members

{"joined": {"@bar:example.com": { "display_name": "Bar", "avatar_url": null }}}

erikjohnston added some commits Dec 8, 2016

Add /room/<room_id>/joined_members API
This returns the currently joined members in the room with their display
names and avatar urls. This is more efficient than /members for large
rooms where you don't need the full events.

@erikjohnston erikjohnston requested a review from NegativeMjark Dec 8, 2016

@erikjohnston erikjohnston referenced this pull request in matrix-org/matrix-doc Dec 8, 2016

Closed

API to enquire what rooms I'm a member of #734

@erikjohnston erikjohnston merged commit 1697f6a into develop Dec 9, 2016

10 of 12 checks passed

Sytest Dendron (Commit) Build #1219 origin/erikj/joined_rooms failed in 1 min 20 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Flake8 + Packaging (Commit) Build #2164 origin/erikj/joined_rooms succeeded in 49 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #2060 origin/erikj/joined_rooms succeeded in 7 min 44 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #2103 origin/erikj/joined_rooms succeeded in 6 min 56 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #2188 origin/erikj/joined_rooms succeeded in 3 min 5 sec
Details
Unit Tests (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

Kegsay added a commit to matrix-org/matrix-appservice-bridge that referenced this pull request Dec 12, 2016

Implement new membership list APIs
matrix-org/synapse#1680
 - `/joined_rooms`
 - `/rooms/$room_id/joined_members`

@Kegsay Kegsay referenced this pull request in matrix-org/matrix-appservice-bridge Dec 12, 2016

Merged

Implement new membership list APIs #45

Member

leonerd commented Dec 12, 2016

I admit it's probably a bit late now, but is there any reason why

{"joined": {"@bar:example.com": { "display_name": "Bar", "avatar_url": null }}}

the toplevel key is joined? This is neither the last component of the URI (joined_members), nor is it the actual membership string value (which would be join).

@leonerd leonerd referenced this pull request in matrix-org/sytest Dec 12, 2016

Merged

Tests for new "room members" APIs #332

Half-Shot added a commit to Half-Shot/matrix-appservice-bridge that referenced this pull request Feb 2, 2017

Implement new membership list APIs
matrix-org/synapse#1680
 - `/joined_rooms`
 - `/rooms/$room_id/joined_members`

@erikjohnston erikjohnston deleted the erikj/joined_rooms branch Mar 29, 2017

@turt2live turt2live referenced this pull request in matrix-org/matrix-js-sdk May 22, 2017

Open

Add joined_rooms and joined_members endpoints #440

t3chguy added a commit to t3chguy/matrix-doc that referenced this pull request Sep 16, 2017

document endpoints from matrix-org/synapse#1680
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

@t3chguy t3chguy referenced this pull request in matrix-org/matrix-doc Sep 16, 2017

Merged

document joinedMembers and joinedRooms endpoints #999

t3chguy commented Oct 2, 2017

Correction: GET /rooms/!foo:example.com/joined_members
s/room/rooms/

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