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

@@ -12,7 +12,7 @@ use ruma::{
};
use tuwunel_core::{
Err, Error, Result, err, extract_variant,
matrix::{Event, PduEvent, event::gen_event_id},
matrix::{Event, PduCount, PduEvent, event::gen_event_id},
utils,
utils::hash::sha256,
warn,
@@ -143,6 +143,7 @@ pub(crate) async fn create_invite_route(
.server_in_room(services.globals.server_name(), &body.room_id)
.await
{
let count = services.globals.next_count();
services
.state_cache
.update_membership(
@@ -153,8 +154,10 @@ pub(crate) async fn create_invite_route(
Some(invite_state),
body.via.clone(),
true,
PduCount::Normal(*count),
)
.await?;
drop(count);
for appservice in services.appservice.read().await.values() {
if appservice.is_user_match(&invited_user) {