feat: #821 - Options to disable local typing and read receipts

This commit is contained in:
Odd E. Ebbesen 2025-07-08 12:43:48 +02:00
commit 564e7097e6
4 changed files with 20 additions and 2 deletions

View file

@ -58,7 +58,9 @@ pub(crate) async fn set_read_marker_route(
}
if let Some(event) = &body.read_receipt {
if !services.users.is_suspended(sender_user).await? {
if services.config.allow_local_read_receipts
&& !services.users.is_suspended(sender_user).await?
{
let receipt_content = BTreeMap::from_iter([(
event.to_owned(),
BTreeMap::from_iter([(

View file

@ -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? {
if services.config.allow_local_typing && !services.users.is_suspended(sender_user).await? {
match body.state {
| Typing::Yes(duration) => {
let duration = utils::clamp(