[FIX+META] Write changelog and enforce GET on RoomAliases

This commit is contained in:
lda 2023-12-09 21:57:37 +01:00
parent 5d2ca5a21b
commit 568543ab39
2 changed files with 14 additions and 0 deletions

View file

@ -41,6 +41,8 @@ will now be maintained separately and have its own releases as well.
custom scripts. custom scripts.
- Greatly simplified some endpoint code by using Cytoplasm's `j2s` for - Greatly simplified some endpoint code by using Cytoplasm's `j2s` for
parsing request bodies. parsing request bodies.
- Create a parser API for grammars found in Matrix, and refactor the
User API to use it.
### New Features ### New Features
@ -58,6 +60,10 @@ the ability to change only a subset of the configuration.
- **GET** `/_telodendria/admin/tokens/[token]` - **GET** `/_telodendria/admin/tokens/[token]`
- **POST** `/_telodendria/admin/tokens` - **POST** `/_telodendria/admin/tokens`
- **DELETE** `/_telodendria/admin/tokens/[token]` - **DELETE** `/_telodendria/admin/tokens/[token]`
- **GET** `/_matrix/client/v3/directory/room/[alias]`
- **PUT** `/_matrix/client/v3/directory/room/[alias]`
- **DELETE** `/_matrix/client/v3/directory/room/[alias]`
- **GET** `/_matrix/client/v3/rooms/[id]/aliases`
## v0.3.0 ## v0.3.0

View file

@ -50,6 +50,14 @@ ROUTE_IMPL(RouteRoomAliases, path, argp)
User *user = NULL; User *user = NULL;
if (HttpRequestMethodGet(args->context) != HTTP_GET)
{
msg = "Route only accepts GET.";
HttpResponseStatus(args->context, HTTP_FORBIDDEN);
response = MatrixErrorCreate(M_FORBIDDEN, msg);
goto finish;
}
response = MatrixGetAccessToken(args->context, &token); response = MatrixGetAccessToken(args->context, &token);
if (response) if (response)
{ {