Trust member list if there are less members than the sync limit

This commit is contained in:
Tulir Asokan
2020-08-19 00:18:28 +03:00
parent 48a624bd07
commit f86fabafbe
+1 -1
View File
@@ -571,7 +571,7 @@ class PortalMetadata(BasePortal, ABC):
# * The member sync count is limited, because then we might ignore some members.
# * It's a channel, because non-admins don't have access to the member list.
trust_member_list = (len(allowed_tgids) < 9900
and self.max_initial_member_sync == -1
and self.max_initial_member_sync > len(allowed_tgids) + 10
and (self.megagroup or self.peer_type != "channel"))
if trust_member_list:
joined_mxids = await self.main_intent.get_room_members(self.mxid)