[FIX] Active users count on `@all` and `@here`
Proposed changes (including videos or screenshots)
this PR updates the old roomMembersCount to count active users instead of everyone
Issue(s)
Steps to test or reproduce
Further comments
Codecov Report
Merging #25957 (6257d93) into develop (0ba7bbc) will increase coverage by
0.04%. The diff coverage is75.00%.
@@ Coverage Diff @@
## develop #25957 +/- ##
===========================================
+ Coverage 38.65% 38.70% +0.04%
===========================================
Files 792 792
Lines 18892 18894 +2
Branches 1937 1937
===========================================
+ Hits 7303 7313 +10
+ Misses 11300 11294 -6
+ Partials 289 287 -2
| Flag | Coverage Δ | |
|---|---|---|
| e2e | 38.70% <75.00%> (+0.04%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
so, I remembered we have a property called __rooms in IUser, this fields stores every room ID the user is joined, except DMs.. since this field is indexed, it can be used to achieve the same results without the need to use $lookup from Subscriptions..
btw, my previous comment is still valid, this is just another solution that is easier to implement.. I think we should get rid of the __rooms field in the future.. in the meantime, we can use it for this.
so, I remembered we have a property called
__roomsinIUser, this fields stores every room ID the user is joined, except DMs.. since this field is indexed, it can be used to achieve the same results without the need to use$lookupfrom Subscriptions..btw, my previous comment is still valid, this is just another solution that is easier to implement.. I think we should get rid of the
__roomsfield in the future.. in the meantime, we can use it for this.
Query updated!