-
Couldn't load subscription status.
- Fork 405
Add report user API from MSC4260 #18120
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
Merged
Merged
Changes from 18 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
f347547
Add report user API from MSC4260
turt2live b5f359a
changelog
turt2live f0dcc7a
Attempt to fix linting
turt2live 61f2750
kick ci
turt2live facf07a
Include in /versions
turt2live 85747b7
Annotate the tests instead
turt2live e8d102d
await
turt2live a842c66
Attempt to fix linting
turt2live 44dbcab
kick ci
turt2live 41d185c
Adjust testing
turt2live 133380f
Attempt to fix linting
turt2live 6ef7a87
kick ci
turt2live dbe43a1
Merge branch 'develop' into travis/report-user
turt2live 8b84c23
Merge branch 'develop' into travis/report-user
turt2live 79c2a0a
Move delta
turt2live 1029a79
Unstable -> Stable
turt2live 6ce8cc0
Attempt to fix linting
turt2live 42b4207
Empty commit to fix CI
turt2live 386a9e6
Apply suggestions from code review
turt2live 2058b2b
Merge branch 'develop' into travis/report-user
turt2live c394ad1
Fix local user check
turt2live 2f8958c
Limit length of `reason`; add rate limit; move to handler
turt2live 9251b45
Attempt to fix linting
turt2live ff53217
Empty commit to kick CI
turt2live 51aceab
move delta again
turt2live ba32d12
I guess imports are important
turt2live 223df14
Add types
turt2live 592a32d
Merge branch 'develop' into travis/report-user
turt2live cf03535
add docs
turt2live 746c506
Add second index; move to new delta
turt2live 7d46b07
move config
turt2live c4cdded
Use generated config
turt2live 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 hidden or 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 [MSC4260 user report API](https://github.com/matrix-org/matrix-spec-proposals/pull/4260). |
This file contains hidden or 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 hidden or 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
21 changes: 21 additions & 0 deletions
21
synapse/storage/schema/main/delta/90/02_add_user_reports.sql
This file contains hidden or 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,21 @@ | ||
| -- | ||
| -- This file is licensed under the Affero General Public License (AGPL) version 3. | ||
| -- | ||
| -- Copyright (C) 2025 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 user_reports ( | ||
| id BIGINT NOT NULL PRIMARY KEY, | ||
| received_ts BIGINT NOT NULL, | ||
| target_user_id TEXT NOT NULL, | ||
| user_id TEXT NOT NULL, | ||
| reason TEXT NOT NULL | ||
| ); | ||
| CREATE INDEX user_reports_target_user_id ON user_reports(target_user_id); -- for lookups |
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.