This commit updates code to send messages to "general chat" topic
if streams used for announcements for "New user signups",
"New created streams", "Moderation requests" and "Zulip updates"
have topics policy set to allow only "general chat" messages.
This refactors a `test_reported_channel_message_narrow_link` which was
previously part of `test_channel_message_report`. It's refactored out
partly to keep the test from being flaky and partly to not bloat it
since it's testing 4 behaviours currently.
Previously `get_submitted_moderation_requests` does not order the query
by message ID which makes the test cases flaky. This updates the
function to sort query result so that the first one should be the latest
one.
To maintain API compatibility during and after the migration to use
DirectMessageGroup for 1:1 messages, we need to build the existing
report message format for 1:1 DMs using DirectMessageGroup.
This adds a new API endpoint that enables users to report messages for
review by admins or moderators. Reports will be sent to the
`moderate_request_channel`, so it must be configured for this feature to
be enabled.
Fixes part of #20047.
Co-authored-by: Adam Sah <140002+asah@users.noreply.github.com>