mattermost/api/v4/source
Harshil Sharma c21ef29f02
Flag post API (#33765)
* Added enable/disable setting and feature flag

* added rest of notifgication settings

* Added backend for content flagging setting and populated notification values from server side defaults

* WIP user selector

* Added common reviewers UI

* Added additonal reviewers section

* WIP

* WIP

* Team table base

* Added search in teams

* Added search in teams

* Added additional settings section

* WIP

* Inbtegrated reviewers settings

* WIP

* WIP

* Added server side validation

* cleanup

* cleanup

* [skip ci]

* Some refactoring

* type fixes

* lint fix

* test: add content flagging settings test file

* test: add comprehensive unit tests for content flagging settings

* enhanced tests

* test: add test file for content flagging additional settings

* test: add comprehensive unit tests for ContentFlaggingAdditionalSettingsSection

* Added additoonal settings test

* test: add empty test file for team reviewers section

* test: add comprehensive unit tests for TeamReviewersSection component

* test: update tests to handle async data fetching in team reviewers section

* test: add empty test file for content reviewers component

* feat: add comprehensive unit tests for ContentFlaggingContentReviewers component

* Added ContentFlaggingContentReviewersContentFlaggingContentReviewers test

* test: add notification settings test file for content flagging

* test: add comprehensive unit tests for content flagging notification settings

* Added ContentFlaggingNotificationSettingsSection tests

* test: add user profile pill test file

* test: add comprehensive unit tests for UserProfilePill component

* refactor: Replace enzyme shallow with renderWithContext in user_profile_pill tests

* Added UserProfilePill tests

* test: add empty test file for content reviewers team option

* test: add comprehensive unit tests for TeamOptionComponent

* Added TeamOptionComponent tests

* test: add empty test file for reason_option component

* test: add comprehensive unit tests for ReasonOption component

* Added ReasonOption tests

* cleanup

* Fixed i18n error

* fixed e2e test lijnt issues

* Updated test cases

* Added snaoshot

* Updated snaoshot

* lint fix

* WIP

* lint fix

* Added post flagging properties setup

* review fixes

* updated snapshot

* CI

* Added base APIs

* Fetched team status data on load and team switch

* WIP

* Review fixes

* wip

* WIP

* Removed an test, updated comment

* CI

* Added tests

* Added tests

* Lint fix

* Added API specs

* Fixed types

* CI fixes

* API tests

* lint fixes

* Set env variable so API routes are regiustered

* Test update

* term renaming and disabling API tests on MySQL

* typo

* Updated store type definition

* Minor tweaks

* Added tests

* Removed error in app startup when content flaghging setup fails

* Updated sync condition:

* Flag message modal basE

* added post preview

* displaying options

* Adde comment input

* Updated tests and docs

* finction rename

* WIP

* Updated tests

* refactor

* lint fix

* MOved to data migration

* lint fix

* CI

* added new migration mocks

* Used setup for tests

* some comment

* Removed unnecesseery nil check

* Form validation

* WIP tests

* WIP tests

* WIP tests

* fix: mock content flagging config selector with correct reasons format

Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>

* fix: add mock for getContentFlaggingConfig in flag post modal test

Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>

* Updated error code order in API docs

* removed empty files

* Added tests

* lint fixes

* minor tweak

* lint fix

* type fix

* fixed test

* nit

* test enhancements

* API WIP

* API WIP

* creating values

* creating content flagging channel and properties

* Able to save properties

* Added another property field

* WIP

* WIP

* Added validations

* Added data validations and hidden post if confifgured to

* lint fixes

* Added API spec

* Added some tests

* Added tests for getContentReviewBot

* test: add comprehensive tests for getContentReviewChannels function

* Added more app layer tests

* Added TestCanFlagPost

* test: Add comprehensive tests for FlagPost function

* Added all app layer tests

* Removed a file that was reamoved downstream

* test: add content flagging test file

* test: add comprehensive tests for FlagContentRequest.IsValid method

* Added model tests

* test: add comprehensive tests for SqlPropertyValueStore.CreateMany

* test: add comprehensive tests for flagPost() API function

* Added API tests

* linter fix

* WIP

* sent post flagging confirmation message

* fixed i18n nissues

* fixed i18n nissues

* CI

* Updated test

* fix: reset contentFlaggingGroupId for test isolation in content flagging tests

* removed cached group ID

* removed debug log

* review fixes

* Used correct ot name

* CI

* Updated mobile text

* Handled JSON error

* fixerdf i18n

* CI

* Integrate flag post api (#33798)

* WIP

* WIP

* Added API call

* test: add test for Client4.flagPost API call in FlagPostModal

* fix: remove userEvent.setup() from flag post modal test

* test: wrap submit button click in act for proper state updates

* Updated tests

* lint fix

* CI

* Updated to allow special characters in comments

* Handled empty comment

* Used finally

* CI

* Fixed test

* Spillage card integration (#33832)

* Created getContentFlaggingFields API

* created getPostPropertyValues API

* WIP

* Created useContentFlaggingFields hook

* WIP

* WIP

* Added option to retain data for reviewers

* Displayed deleted post's preview

* DIsplayed all properties

* Adding field name i18n

* WIP - managing i18n able texts

* Finished displaying all fields

* Manual cleanup

* lint fixes

* team role filter logic fix

* Fixed tests

* created new API to fetch flagged posts

* lint fix

* Added new client methods

* test: add comprehensive tests for content flagging APIs

* Added new API tests

* fixed openapi spec

* Fixed DataSpillageReport tests

* Fixed PostMarkdown test

* Fixed PostPreviewPropertyRenderer test

* Added metadata to card renderer

* test fixes

* Added no comment placeholder

* Fixed test

* refactor: improve test mocking for data spillage report component

* test mock updates

* Updated reducer

* not resetting mocks

* WIP

* review fixes

* CI

* Fixed

* fixes

* Content flagging actions implementation (#33852)

* Added view detail button

* Created RemoveFlaggedMessageConfirmationModal modal

* Added key and remove flag request modal

* IMplemented delete flagged post

* Handled edge cases of deleting flagged post

* keep message

* UI integration

* Added WS event for post report update and handled deleted files of flagged post

* Added error handling in keep/remove forms

* i18n fixes

* Updated OpenAPI specs

* fixed types

* fixed types

* refactoring

* Fixed tests

* review fixes

* Added new property translations

* Improved test

* fixed test

* CI

* fixes

* CI

* fixed a test

* CI

---------

Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
2025-10-02 20:24:29 +05:30
..
access_control.yaml MM-65618 - filter based on admin values (#33857) 2025-09-12 20:09:47 +02:00
actions.yaml Add Dynamic Select for Interactive Dialog (#33586) 2025-08-28 07:47:28 -06:00
audit_logging.yaml Feature/audit certificate upload (#30223) 2025-04-16 09:34:18 -04:00
bleve.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
bookmarks.yaml Channel Bookmarks (#25449) 2024-03-12 08:36:05 -06:00
bots.yaml [MM-57966]Centralize the 200 maximum page size cap for the per_page parameter and remove individual mentions from API endpoint documentation (#26859) 2024-04-25 21:18:25 +05:30
brand.yaml Updated API Code Samples (#24141) 2023-08-03 12:45:10 -03:00
channels.yaml Added API docs for /common_teams API (#33941) 2025-09-25 08:41:48 +05:30
cloud.yaml Add support for dynamic fetching of preview modal content from S3 bucket (#33380) 2025-07-15 12:58:18 -04:00
cluster.yaml Update /api/v4/cluster/status docs (#28189) 2024-09-16 17:51:51 +02:00
commands.yaml Updated API Code Samples (#24141) 2023-08-03 12:45:10 -03:00
compliance.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
content_flagging.yaml Flag post API (#33765) 2025-10-02 20:24:29 +05:30
custom_profile_attributes.yaml Adds operation ID to the PatchCPAValuesForUser endpoint (#33963) 2025-09-26 10:56:37 +02:00
dataretention.yaml [MM-57966]Centralize the 200 maximum page size cap for the per_page parameter and remove individual mentions from API endpoint documentation (#26859) 2024-04-25 21:18:25 +05:30
definitions.yaml Update api user endpoint docs to fix useAutomaticTimezone type and document more fields (#33901) 2025-09-16 12:58:31 +00:00
elasticsearch.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
emoji.yaml Add documentation for get emojis by names API (#24983) 2023-10-17 15:09:26 -04:00
exports.yaml Updated API Code Samples (#24141) 2023-08-03 12:45:10 -03:00
files.yaml [MM-51201/MM-60406/MM-60404] CrossTeam Search posts and files (#28478) 2024-11-21 13:40:46 -07:00
groups.yaml [GH-28202]: Added GetGroupsByNames API (#33558) 2025-08-20 18:20:07 -04:00
imports.yaml MMCTL: Add import delete cmd for removing the import files (#29764) 2025-06-10 12:06:38 +02:00
introduction.yaml feat: Switch from Redoc to Stoplight Elements for API documentation (#30591) 2025-04-17 12:31:56 +03:00
ip_filters.yaml [CLD-6324] Cloud IP Filtering (#24726) 2023-11-14 09:12:04 -05:00
jobs.yaml [MM-56074] mmctl job commands (#26855) 2024-06-17 12:07:05 -04:00
ldap.yaml [MM-63152] LDAP Wizard (#31417) 2025-06-16 16:19:33 -04:00
limits.yaml Added post limit warning (#26793) 2024-04-18 11:50:30 +05:30
logs.yaml MM-57013 Added download button for downloading logs from server logs page in system console (#26389) 2024-06-24 14:05:23 -04:00
metrics.yaml Add 'metrics' tag to /api/v4/client_perf endpoint (#29612) 2025-01-14 09:24:31 +00:00
oauth.yaml Updated API Code Samples (#24141) 2023-08-03 12:45:10 -03:00
outgoing_oauth_connections.yaml Webapp - Outgoing OAuth Connections (#25507) 2024-02-09 14:49:49 -05:00
permissions.yaml Remove deprecated function (#27605) 2024-07-17 16:02:39 -06:00
plugins.yaml Updated API Code Samples (#24141) 2023-08-03 12:45:10 -03:00
posts.yaml MM-56548: [AI assisted]Add support for incremental thread loading using UpdateAt timestamp (#30486) 2025-04-22 10:43:13 +05:30
preferences.yaml MM 55199 Limit User Preferences (#25579) 2024-02-01 15:33:24 -07:00
reactions.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
remoteclusters.yaml MM-61032: Add default_team_id to accept invite flow (#28841) 2024-10-18 12:26:38 +02:00
reports.yaml [MM-62398] Fix /api/v4/reports/users/export api docs (#29750) 2025-01-13 09:42:16 +01:00
roles.yaml Clarify patch role permissions (#30128) 2025-02-21 17:08:58 +02:00
saml.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
scheduled_post.yaml Feature scheduled messages (#28932) 2024-11-04 11:39:35 +05:30
schemes.yaml Update schemes.yaml (#29502) 2024-12-12 12:19:09 +01:00
service_terms.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
sharedchannels.yaml MM-64531: [Shared Channels] Users on different remote servers should not communicate unless the remotes have established secure connection. (#30985) 2025-07-15 09:30:07 +02:00
status.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
system.yaml MM-64807: Deprecate format parameter in client config endpoint (#33605) 2025-08-20 12:15:11 -03:00
teams.yaml add missing query parameters to GetTeamMembers API doc (#27106) 2024-05-28 10:06:47 -06:00
uploads.yaml Updated API Code Samples (#24141) 2023-08-03 12:45:10 -03:00
usage.yaml Move API Reference (#23777) 2023-06-27 11:10:13 -03:00
users.yaml MM 65084 server-side (#33861) 2025-09-29 14:29:32 -07:00
webhooks.yaml [GH-26715] Added Pagination Support for IncomingWebHooks (#27502) 2024-08-09 16:44:22 -04:00