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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user