-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4846 +/- ##
===========================================
- Coverage 75.31% 74.96% -0.35%
===========================================
Files 340 340
Lines 34924 35221 +297
Branches 5718 5824 +106
===========================================
+ Hits 26302 26404 +102
- Misses 7009 7179 +170
- Partials 1613 1638 +25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please talk me through why we need both users_who_share_public_rooms
and users_in_public_rooms
? Do we still want to have users_who_share_public_rooms
, users_who_share_private_rooms
and users_in_public_rooms
? I'm broadly very confused what those changes are giving us, and why we need to recalculate everything from scratch
@erikjohnston wrt why we have in public and in private rooms: #4833 (comment) I'd like to get rid of the cross product of those sharing public rooms, but then we'd need to come up with a new way of figuring out how to tell if we need to purge remote users from the user directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think this looks OK. Though I think if we're going to bother creating a users_in_public_rooms
we should have a firm plan to kill off users_who_share_public_rooms
in the short term, as otherwise it seems to be a bit of a pointless table tbh
Don't we already have a |
@erikjohnston yes, but it had some incredibly weird "last room" room ID. |
|
||
return self.runInteraction( | ||
"add_users_who_share_room", _add_users_who_share_room_txn | ||
) | ||
|
||
def add_users_in_public_rooms(self, room_id, user_ids): | ||
"""Insert entries into the users_who_share_private_rooms table. The first | ||
user should be a local user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't seem to handle the first user in any special way?
Fixes #4833