-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add report room API (MSC4151) #17270
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
85975ac
Rename file to generify
turt2live f305306
Add new endpoint
turt2live 9949d09
Add tests (and rename file to generify)
turt2live 14aed80
changelog
turt2live 53b5385
Appease the linter
turt2live 1997319
Fix type checking?
turt2live 723b8c5
Type hints?
turt2live 88d7a3d
Fix tests to use unstable endpoint
turt2live 39b5353
appease linter
turt2live 87bd811
Merge remote-tracking branch 'origin/develop' into travis/report-room
turt2live 8b69529
Drop `content` from schema
turt2live fdfda3e
Use pydantic
turt2live df14093
I guess the import changed
turt2live 8a5ddda
Add unstable feature flag
turt2live 1289ccd
Remove unused admin user in the tests
sandhose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for the unstable [MSC4151](https://github.com/matrix-org/matrix-spec-proposals/pull/4151) report room API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
synapse/storage/schema/main/delta/85/06_add_room_reports.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- | ||
-- This file is licensed under the Affero General Public License (AGPL) version 3. | ||
-- | ||
-- Copyright (C) 2024 New Vector, Ltd | ||
-- | ||
-- This program is free software: you can redistribute it and/or modify | ||
-- it under the terms of the GNU Affero General Public License as | ||
-- published by the Free Software Foundation, either version 3 of the | ||
-- License, or (at your option) any later version. | ||
-- | ||
-- See the GNU Affero General Public License for more details: | ||
-- <https://www.gnu.org/licenses/agpl-3.0.html>. | ||
|
||
CREATE TABLE room_reports ( | ||
id BIGINT NOT NULL PRIMARY KEY, | ||
received_ts BIGINT NOT NULL, | ||
room_id TEXT NOT NULL, | ||
user_id TEXT NOT NULL, | ||
reason TEXT NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't match the unstable prefix (
/_matrix/client/unstable/org.matrix.msc4151/report/:roomId
) in the MSC, but I'll assume this is an oversight in the MSC, not the implementationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment on the MSC: matrix-org/matrix-spec-proposals#4151 (comment)