hoist receipt ACL check

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-05-27 04:13:40 +00:00 committed by June 🍓🦴
parent abdda6cf32
commit 71a1285c7b

View file

@ -352,19 +352,19 @@ pub(crate) async fn send_transaction_message_route(
}
for (room_id, room_updates) in receipt.receipts {
for (user_id, user_updates) in room_updates.read {
if user_id.server_name() != origin {
debug_warn!(%user_id, %origin, "received read receipt EDU for user not belonging to origin");
continue;
}
if services()
.rooms
.event_handler
.acl_check(user_id.server_name(), &room_id)
.acl_check(origin, &room_id)
.is_err()
{
debug_warn!(%user_id, %room_id, "received read receipt EDU from ACL'd user's server");
debug_warn!(%origin, %room_id, "received read receipt EDU from ACL'd server");
continue;
}
for (user_id, user_updates) in room_updates.read {
if user_id.server_name() != origin {
debug_warn!(%user_id, %origin, "received read receipt EDU for user not belonging to origin");
continue;
}