diff options
author | S7evinK <tfaelligen@gmail.com> | 2020-11-05 11:19:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 10:19:23 +0000 |
commit | eccd0d2c1b8bd4b921bafca4585aa09d32ae561f (patch) | |
tree | 6a37ea3d0d67785cc9a51b132b25158c941dc899 /federationapi | |
parent | 2ce2112ddb783ab9a589f2897dc60d24c68e34f0 (diff) |
Implement forgetting about rooms (#1572)
* Add basic storage methods
* Add internal api handler
* Add check for forgotten room
* Add /rooms/{roomID}/forget endpoint
* Add missing rsAPI method
* Remove unused parameters
* Add passing tests
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Add missing file
* Add postgres migration
* Add sqlite migration
* Use Forgetter to forget room
* Remove empty line
* Update HTTP status codes
It looks like the spec calls for these to be 400, rather than 403: https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-rooms-roomid-forget
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'federationapi')
-rw-r--r-- | federationapi/routing/send_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/federationapi/routing/send_test.go b/federationapi/routing/send_test.go index 0a462433..f292e741 100644 --- a/federationapi/routing/send_test.go +++ b/federationapi/routing/send_test.go @@ -84,6 +84,10 @@ type testRoomserverAPI struct { queryLatestEventsAndState func(*api.QueryLatestEventsAndStateRequest) api.QueryLatestEventsAndStateResponse } +func (t *testRoomserverAPI) PerformForget(ctx context.Context, req *api.PerformForgetRequest, resp *api.PerformForgetResponse) error { + return nil +} + func (t *testRoomserverAPI) SetFederationSenderAPI(fsAPI fsAPI.FederationSenderInternalAPI) {} func (t *testRoomserverAPI) InputRoomEvents( |