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:
parent
b50c47e1c2
commit
11bc725268
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue