mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-14 08:33:50 +01:00
Finish implementing the capabilities endpoint (#1449)
Closes #1310 Signed-off-by: Benjamin Nater <me@bn4t.me>
This commit is contained in:
parent
ce318f53bc
commit
da89f2bd1f
2 changed files with 6 additions and 2 deletions
|
@ -23,8 +23,8 @@ import (
|
||||||
"github.com/matrix-org/util"
|
"github.com/matrix-org/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SendMembership implements PUT /rooms/{roomID}/(join|kick|ban|unban|leave|invite)
|
// GetCapabilities returns information about the server's supported feature set
|
||||||
// by building a m.room.member event then sending it to the room server
|
// and other relevant capabilities to an authenticated user.
|
||||||
func GetCapabilities(
|
func GetCapabilities(
|
||||||
req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI,
|
req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI,
|
||||||
) util.JSONResponse {
|
) util.JSONResponse {
|
||||||
|
@ -41,6 +41,9 @@ func GetCapabilities(
|
||||||
|
|
||||||
response := map[string]interface{}{
|
response := map[string]interface{}{
|
||||||
"capabilities": map[string]interface{}{
|
"capabilities": map[string]interface{}{
|
||||||
|
"m.change_password": map[string]bool{
|
||||||
|
"enabled": true,
|
||||||
|
},
|
||||||
"m.room_versions": roomVersionsQueryRes,
|
"m.room_versions": roomVersionsQueryRes,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -480,3 +480,4 @@ Federation key API can act as a notary server via a GET request
|
||||||
Inbound /make_join rejects attempts to join rooms where all users have left
|
Inbound /make_join rejects attempts to join rooms where all users have left
|
||||||
Inbound federation rejects invites which include invalid JSON for room version 6
|
Inbound federation rejects invites which include invalid JSON for room version 6
|
||||||
Inbound federation rejects invite rejections which include invalid JSON for room version 6
|
Inbound federation rejects invite rejections which include invalid JSON for room version 6
|
||||||
|
GET /capabilities is present and well formed for registered user
|
Loading…
Reference in a new issue