dendrite icon indicating copy to clipboard operation
dendrite copied to clipboard

Fix issues around /roomId/members

Open kegsay opened this issue 5 years ago • 4 comments

Spec: https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-rooms-roomid-members Sytests:

    × Can get rooms/{roomId}/members at a given point
    × Can filter rooms/{roomId}/members

kegsay avatar Aug 24 '20 16:08 kegsay

So I investigated the first API endpoint. I guessed that https://github.com/matrix-org/dendrite/blob/master/clientapi/routing/memberships.go#L60 needs to be extended with an "At" and passing it though from the client request. So I ended up at https://github.com/Grotax/dendrite/blob/master/roomserver/storage/interface.go#L129

But I guess then the At would need to be implemented for each DB implementation.

I think it makes sense to only query the data in the DB we actually need but I'm not a 100% sure. So I'm just gonna leave this here for now.

Grotax avatar Dec 04 '20 11:12 Grotax

@Kegsay @Grotax I would like to work on this issue. I am new to Matrix and I am not familiar with its codebase. It would be great if anyone could provide me some pointers on how to begin fixing this issue.

akhil-dh1 avatar Dec 28 '20 15:12 akhil-dh1

@kegsay - been also taking a look at this, quite new to Matrix (codebase wise).

Looking at how GetMembershipEventNIDsForRoom() is implemented, I'm not really sure how to take the provided at and filter events using it.

Forgive the horror within https://github.com/matrix-org/dendrite/pull/2041, but any pointers would be great. Keen to implement.

alam0rt avatar Nov 06 '21 04:11 alam0rt

Still failing as of today.

kegsay avatar May 23 '22 14:05 kegsay

Still yet as of today, while converting the test to complement

ShadowJonathan avatar Oct 14 '22 18:10 ShadowJonathan

Implemented as of https://github.com/matrix-org/dendrite/pull/2827

S7evinK avatar Nov 02 '22 05:11 S7evinK