mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-03 14:42:47 +00:00
Implement /joined_rooms (#911)
* Implemented /joined_rooms * Removed account endpoint added by mistake * trigger ci
This commit is contained in:
parent
ec38783192
commit
dc06c69887
9 changed files with 112 additions and 2 deletions
|
@ -234,6 +234,16 @@ func (d *Database) GetMembershipInRoomByLocalpart(
|
|||
return d.memberships.selectMembershipInRoomByLocalpart(ctx, localpart, roomID)
|
||||
}
|
||||
|
||||
// GetRoomIDsByLocalPart returns an array containing the room ids of all
|
||||
// the rooms a user matching a given localpart is a member of
|
||||
// If no membership match the given localpart, returns an empty array
|
||||
// If there was an issue during the retrieval, returns the SQL error
|
||||
func (d *Database) GetRoomIDsByLocalPart(
|
||||
ctx context.Context, localpart string,
|
||||
) ([]string, error) {
|
||||
return d.memberships.selectRoomIDsByLocalPart(ctx, localpart)
|
||||
}
|
||||
|
||||
// GetMembershipsByLocalpart returns an array containing the memberships for all
|
||||
// the rooms a user matching a given localpart is a member of
|
||||
// If no membership match the given localpart, returns an empty array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue