Add PduCount value to userroomid/roomuserid_joined; move PduCount to argument for update_membership.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-01 23:01:57 +00:00
parent eda45e445c
commit f1c2548807
8 changed files with 55 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ use ruma::{
};
use tuwunel_core::{
Err, Result, debug, debug_info, debug_warn, error, info,
matrix::PduCount,
result::NotFound,
utils::{
IterStream, ReadyExt,
@@ -450,16 +451,18 @@ async fn retroactively_fix_bad_data_from_roomuserid_joined(services: &Services)
for user_id in &joined_members {
debug_info!("User is joined, marking as joined");
let count = services.globals.next_count();
services
.state_cache
.mark_as_joined(user_id, room_id);
.mark_as_joined(user_id, room_id, PduCount::Normal(*count));
}
for user_id in &non_joined_members {
debug_info!("User is left or banned, marking as left");
let count = services.globals.next_count();
services
.state_cache
.mark_as_left(user_id, room_id);
.mark_as_left(user_id, room_id, PduCount::Normal(*count));
}
}