abstract+add more "users in room" accessors, check membership state on active_local_joined_users_in_room
`roomuserid_joined` cf seems unreliable, so in the mean time we need to check membership state (or maybe this is a more reliable check anyways) Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
c738c119f8
commit
0857fe7907
3 changed files with 76 additions and 17 deletions
|
@ -6,6 +6,7 @@ use std::{
|
|||
};
|
||||
|
||||
use data::Data;
|
||||
use itertools::Itertools;
|
||||
use rand::prelude::SliceRandom;
|
||||
use ruma::{
|
||||
api::{client::error::ErrorKind, federation},
|
||||
|
@ -309,7 +310,8 @@ impl Service {
|
|||
let mut push_target = services()
|
||||
.rooms
|
||||
.state_cache
|
||||
.active_local_users_in_room(&pdu.room_id);
|
||||
.active_local_joined_users_in_room(&pdu.room_id)
|
||||
.collect_vec();
|
||||
|
||||
if pdu.kind == TimelineEventType::RoomMember {
|
||||
if let Some(state_key) = &pdu.state_key {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue