Skip to content
Snippets Groups Projects
Commit 4f0006d1 authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

ignore typing EDUs from ACL'd user's servers

parent b822e3a9
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
};
use axum::{response::IntoResponse, Json};
use conduit::{debug_info, debug_warn};
use get_profile_information::v1::ProfileField;
use rand::seq::SliceRandom;
use ruma::{
......@@ -45,7 +46,7 @@
serde::{Base64, JsonObject, Raw},
to_device::DeviceIdOrAllDevices,
uint, user_id, CanonicalJsonValue, EventId, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedServerName,
OwnedServerSigningKeyId, OwnedUserId, RoomId, RoomVersionId, ServerName,
OwnedServerSigningKeyId, OwnedUserId, RoomId, RoomVersionId, ServerName, UserId,
};
use serde_json::value::{to_raw_value, RawValue as RawJsonValue};
use tokio::sync::RwLock;
......@@ -369,6 +370,16 @@ pub(crate) async fn send_transaction_message_route(
continue;
}
if services()
.rooms
.event_handler
.acl_check(typing.user_id.server_name(), &typing.room_id)
.is_err()
{
debug_warn!(%typing.user_id, %typing.room_id, "received typing EDU for ACL'd user's server");
continue;
}
if services()
.rooms
.state_cache
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment