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 authored and June committed 2024-01-25 19:28:33 -05:00
1 parent b50c47e1c2
commit 11bc725268
1 file changed
+7 -1
+7 -1
View File
@@ -200,7 +200,13 @@ impl Service {
let ctx = PushConditionRoomCtx {
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_display_name: services()
.users