feat: Do not allow suspended users to send typing statuses

This commit is contained in:
nexy7574 2025-06-28 22:53:25 +01:00 committed by Ellis Git
parent 1124097bd1
commit 72f8cb3038

View file

@ -26,7 +26,7 @@ pub(crate) async fn create_typing_event_route(
{ {
return Err!(Request(Forbidden("You are not in this room."))); return Err!(Request(Forbidden("You are not in this room.")));
} }
if !services.users.is_suspended(sender_user).await? {
match body.state { match body.state {
| Typing::Yes(duration) => { | Typing::Yes(duration) => {
let duration = utils::clamp( let duration = utils::clamp(
@ -62,6 +62,7 @@ pub(crate) async fn create_typing_event_route(
.await?; .await?;
}, },
} }
}
// ping presence // ping presence
if services.config.allow_local_presence { if services.config.allow_local_presence {