Function wicrs_server::api::mute_user [−][src]
pub async fn mute_user(actor_id: &str, hub_id: ID, user_id: &str) -> Result<()>
Expand description
Mutes a user in a hub.
Arguments
actor_id
- ID of the user who is muting.hub_id
- Hub in which the user is being muted.user_id
- ID of the user who is to be muted.
Errors
This function may fail for any of the following reasons:
- The user performing the mute is not in the hub
- The hub could not be loaded for any of the reasons outlined by
Hub::load
. - The user performing the mute does not have permission to mute other users.
- The mute failed for any of the reasons outlined by
Hub::mute_user
.