return joined member count of room for pushrules instead of hardcoded 10

im not sure what the TODO is trying to say here,
but since it's many years old and conduwuit is
fast, i dont see an issue with this.

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-01-20 19:51:39 -05:00
parent 13af7e30ad
commit ce24b509cf

View file

@ -200,7 +200,13 @@ impl Service {
let ctx = PushConditionRoomCtx { let ctx = PushConditionRoomCtx {
room_id: room_id.to_owned(), room_id: room_id.to_owned(),
member_count: 10_u32.into(), // TODO: get member count efficiently member_count: UInt::from(
services()
.rooms
.state_cache
.room_joined_count(room_id)?
.unwrap_or(1) as u32,
),
user_id: user.to_owned(), user_id: user.to_owned(),
user_display_name: services() user_display_name: services()
.users .users