mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-09 16:06:41 +02:00
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
13af7e30ad
commit
ce24b509cf
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue