mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-30 05:04:29 +02:00
feat: Do not allow suspended users to send typing statuses
This commit is contained in:
parent
1124097bd1
commit
72f8cb3038
1 changed files with 34 additions and 33 deletions
|
@ -26,7 +26,7 @@ pub(crate) async fn create_typing_event_route(
|
|||
{
|
||||
return Err!(Request(Forbidden("You are not in this room.")));
|
||||
}
|
||||
|
||||
if !services.users.is_suspended(sender_user).await? {
|
||||
match body.state {
|
||||
| Typing::Yes(duration) => {
|
||||
let duration = utils::clamp(
|
||||
|
@ -62,6 +62,7 @@ pub(crate) async fn create_typing_event_route(
|
|||
.await?;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ping presence
|
||||
if services.config.allow_local_presence {
|
||||
|
|
Loading…
Add table
Reference in a new issue