mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: Do not allow suspended users to send typing statuses
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user