mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-13 13:37:39 +02:00
feat: Do not allow suspended users to send typing statuses
Some checks failed
Checks / Prefligit / prefligit (push) Failing after 14s
Release Docker Image / define-variables (push) Failing after 3s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Format (push) Failing after 3s
Checks / Rust / Clippy (push) Failing after 31s
Checks / Rust / Cargo Test (push) Failing after 31s
Some checks failed
Checks / Prefligit / prefligit (push) Failing after 14s
Release Docker Image / define-variables (push) Failing after 3s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Format (push) Failing after 3s
Checks / Rust / Clippy (push) Failing after 31s
Checks / Rust / Cargo Test (push) Failing after 31s
This commit is contained in:
parent
617defe0d9
commit
b3428c2e3d
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.")));
|
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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue