mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
muted users: Add support to muting bots.
We intentionally disallow muting bots previously upon a pending design decision in #16915. This lifts that constraint. Fixes #22693.
This commit is contained in:
committed by
Tim Abbott
parent
27664459cb
commit
693b3679e3
@@ -16,7 +16,7 @@ def mute_user(request: HttpRequest, user_profile: UserProfile, muted_user_id: in
|
||||
raise JsonableError(_("Cannot mute self"))
|
||||
|
||||
muted_user = access_user_by_id(
|
||||
user_profile, muted_user_id, allow_bots=False, allow_deactivated=True, for_admin=False
|
||||
user_profile, muted_user_id, allow_bots=True, allow_deactivated=True, for_admin=False
|
||||
)
|
||||
date_muted = timezone_now()
|
||||
|
||||
@@ -32,7 +32,7 @@ def unmute_user(
|
||||
request: HttpRequest, user_profile: UserProfile, muted_user_id: int
|
||||
) -> HttpResponse:
|
||||
muted_user = access_user_by_id(
|
||||
user_profile, muted_user_id, allow_bots=False, allow_deactivated=True, for_admin=False
|
||||
user_profile, muted_user_id, allow_bots=True, allow_deactivated=True, for_admin=False
|
||||
)
|
||||
mute_object = get_mute_object(user_profile, muted_user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user