mute user: Add backend infrastructure code.

Adds backend code for the mute users feature.
This is just infrastructure work (database
interactions, helpers, tests, events, API docs
etc) and does not involve any behavioral/semantic
aspects of muted users.

Adds POST and DELETE endpoints, to keep the
URL scheme mostly consistent in terms of `users/me`.

TODOs:
1. Add tests for exporting `zulip_muteduser` database table.
2. Add dedicated methods to python-zulip-api to be used
   in place of the current `client.call_endpoint` implementation.
This commit is contained in:
Abhijeet Prasad Bodas
2021-03-27 16:53:32 +05:30
committed by Tim Abbott
parent 89f6139505
commit 3bfcaa3968
21 changed files with 522 additions and 12 deletions

View File

@@ -160,6 +160,7 @@ ALL_ZULIP_TABLES = {
"zerver_userprofile_user_permissions",
"zerver_userstatus",
"zerver_mutedtopic",
"zerver_muteduser",
}
# This set contains those database tables that we expect to not be
@@ -223,6 +224,7 @@ NON_EXPORTED_TABLES = {
# export before they reach full production status.
"zerver_defaultstreamgroup",
"zerver_defaultstreamgroup_streams",
"zerver_muteduser",
"zerver_submessage",
# This is low priority, since users can easily just reset themselves to away.
"zerver_userstatus",